home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / Technical Docs / Inside Macintosh / New Inside Mac - draft / Imaging / Imaging
Encoding:
Text File  |  1992-01-14  |  567.9 KB  |  1,836 lines  |  [ONLN/HLX2]

  1. Inside Macintosh:Imaging    Apple Computer, Inc. © 1991, Apple Computer, Inc.All rights reserved.Printed in the United States of America.The Apple logo is a registered trademark of Apple Computer, Inc. Use of the “keyboard” Apple logo (Option-Shift-K) for commercial purposes without the prior written consent of Apple may constitute trademark infringement and unfair compe-tition in violation of federal and state laws.Apple Computer, Inc. 20525 Mariani Avenue  Cupertino, CA  95014-6299408-996-1010  Apple, the Apple logo, APDA, AppleLink, AppleShare, AppleTalk, Apple IIGS, A/UX, EtherTalk, HyperCard, Hyper-Talk, ImageWriter, LaserWriter, LocalTalk, Mac, Macintosh, MPW, MultiFinder, SANE, and TokenTalk are registered trade-marks of Apple Computer, Inc.Apple Desktop Bus, Balloon Help, Finder, KanjiTalk, Moof, QuickDraw, ResEdit, TrueType, and Zhong-Wen Talk are trade-marks of Apple Computer, Inc.Helvetica and Times are registered trademarks of Linotype Company.ITC Zapf Dingbats is a registered trademark of International Typeface Corporation.MacPaint is a registered trade-mark of Claris Corporation.NuBus is a trademark of Texas Instruments.PostScript is a registered trade-mark, and Illustrator is a trademark, of Adobe Systems Incorporated.Sony is a registered trademark of Sony Corporation.UNIX is a registered trademark of UNIX System Laboratories, Inc.Simultaneously published in the United States and Canada.Limited Warranty on Media and ReplacementEven though Apple has reviewed this manual, APPLE MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS MANUAL, ITS QUALITY, ACCURACY, MERCHANT-ABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. AS A RESULT, THIS MANUAL IS SOLD “AS IS,” AND YOU, THE PUR-CHASER, ARE ASSUMING THE ENTIRE RISK AS TO ITS QUALITY AND ACCURACY.  IN NO EVENT WILL APPLE BE LIABLE FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSE-QUENTIAL DAMAGES RESULTING FROM ANY DEFECT OR INACCURACY IN THIS MANUAL, even if advised of the possibility of such damages.  THE WARRANTY AND REMEDIES SET FORTH ABOVE ARE EXCLUSIVE AND IN LIEU OF ALL OTHERS, ORAL OR WRITTEN, EXPRESS OR IMPLIED. No Apple dealer, agent, or employee is authorized to make any modification, extension, or addition to this warranty.  Some states do not allow the exclusion or limitation of implied warranties or liability for incidental or consequential damages, so the above limitation or exclusion may not apply to you. This warranty gives you specific legal rights, and you may also have other rights which vary from state to state.The Printing ManagerIntroduction to Printing2-3Methods and Qualities of Printing2-4Page and Paper Rectangles2-4Printer Resolution2-5About the Printing Manager2-6The User’s Formatting Input2-6The Print Record and the Printing Loop2-7The Idle Procedure2-8Using the Printing Manager2-9Creating and Using the Print Record2-9Printing a Document2-10Printing From the Finder2-15Printing Each Page as a Separate Document2-15Printing From the Low-Level Interface2-16Checking for PrGeneral2-16Determining the Resolution of the Current Printer2-17Determining Page Orientation2-20Choosing Draft-Quality Printing2-21Altering the Style or Job Dialog Box2-23Writing an Idle Procedure2-25Optimizing Printing2-26Optimizing PostScript Printing2-26Providing Names of Documents Being Printed2-27Canceling or Pausing the Printing Process2-28Handling Printing Errors2-28Using Alert or Dialog Boxes to Report Errors2-28Interpreting PrGeneral Errors2-29Reference2-29Data Structures2-29TPrint  2-30TPrInfo 2-31TPrJob 2-31TPrStl 2-33TPrStatus 2-33TPrPort2-34TGnlData 2-35TGetRslBlk 2-35TSetRslBlk 2-37TDftBitsBlk 2-38TGetRotnBlk 2-38TPrDlg 2-39Routines2-40Opening and Closing the Printing Manager2-40Filling and Verifying Print Records2-41Displaying and Customizing the Printing Dialog Boxes2-43Printing2-47Optimizing Printing2-51Error Handling2-54Low-Level Routines2-56Low-Level Control Calls2-58Summary2-611The Printing ManagerThis chapter describes the theory behind and implementation of printing from the Macintosh computer to any printer: Your application draws a printed document on a printer just as it draws an image on a monitor screen. This manner of printing allows you to use the same QuickDraw routines for printing as for screen display. The chapter also describes what your application needs to do to allow the user to print on any type of printer and how you can optimize printing on different types of printers.You should use this chapter if you want your application to allow the user to print. Before reading this chapter, you should be familiar with QuickDraw’s drawing routines and the grafPort data type. You may also need to refer to the <italics\>Worldwide Software volume for information about printing text from non-Roman script systems.This chapter begins with a description of the elements of the printing environment:  types of printing, page characteristics, and printer characteristics. Then it describes n    printing a documentn    optimizing printing performancen    handling printing errorsn    using picture commentsFor further information about the LaserWriter printer and how it operates, see the LaserWriter Reference, published by Addison-Wesley. For information about how PostScript works and the specifics of PostScript commands, see the PostScript Language Reference Manual, also published by Addison-Wesley. Introduction to PrintingIn order for your application to print, it sends an image to a printer, taking into account the features the printer offers, how the printer prints, and the size of the paper the user wants. Your application doesn’t have to know the kind of printer the user has chosen, because you call the same printing routines, regardless of the type of printer. These routines are translated into actual printing code by the printer resource file, which is on the user’s system. (Each type of printer has its own printer resource file.) The printer resource file contains a device driver, called the printer driver, that takes the document from the Printing Manager and sends it to the printer. One printer driver can communicate with several printers of the same type; for example, the LaserWriter printer driver can work with several LaserWriter printers on a network.   Your application should be device-independent when it prints a document, so that it doesn’t rely on any one printer feature being present. For instance, the current printer the user has selected may produce laser-quality or dot-matrix type, and your application should be ready to handle both. The Printing Manager takes much of the work out of coming up with a single way to handle all possible printer environments. However, while you shouldn’t depend on any feature being present, there are a few things about printers of which you should be aware and which you can use to optimize printing: the method of printing the user wants, the size of the paper on which the user will print the document, and the resolution of the printer.Methods and Qualities of PrintingThere are two basic methods of printing documents: immediate and deferred. The Printing Manager chooses which method to use by determining the capabilities of the current printer and using the printing preferences selected by the user.  The two printing methods are implemented in different ways for different printers. Immediate printing means that the document prints as your application draws it in the printing grafPort. Your QuickDraw drawing calls are converted directly into command codes the printer driver understands and uses to print the document. Your printing code, the data to be printed, and the printer driver code are all present in memory. Immediate printing is also known as draft printing.   With deferred printing, the Printing Manager writes out a representation of the document’s printed image to a disk file (called a spool file) or possibly to memory; this information is then converted into a bit image and printed. Deferred printing is also known as spool printing.   The internal format of spool files is private to the Printing Manager and may vary from one printer to another. You should not attempt to determine the format of these files or use <36pt\>\x12 <8bat\>u There are also two qualities of printing: high-quality and draft-quality. High-quality printing produces documents that use all of the fonts and formatting that the user has included. Draft-quality printing produces quick, low-quality drafts of text documents that are printed straight down the page from top to bottom and left to right. Generally, only text is printed using the printer’s internal fonts, without formatting.   n    The LaserWriter printer produces only high-quality output. n    The ImageWriter printer can produce high-quality or draft-quality output. Deferred printing produces standard or high-quality printing; immediate printing produces draft-quality printing. Page and Paper RectanglesThere are two sizes to consider when printing a document: the physical size of the paper, and the area on the paper that the printer can use to format the document, which should be smaller than the physical sheet of paper to account for margins. The page rectangle represents the boundaries of the printable page. Its top left corner always has the coordinates (0,0); the coordinates of the bottom right corner give the maximum page height and width attainable on the given printer, in dots. The paper rectangle gives the physical paper size, defined in the same coordinate system as the page rectangle. Thus, the top left coordinates of the paper rectangle are typically negative and its bottom right coordinates are greater than those of the page rectangle. The relationship of the two rectangles is shown in Figure 1-1.     Page and paper rectangles  Your application should always use the page rectangle sizes provided by the printer driver and should not attempt to change them or add new ones. If your application supports page size other than those provided by the printer driver for the current printer, you risk compatibility problems with Apple’s printer drivers and those of third-party printer makers. When formatting a page for printing, remember that in general the screen is wider than it is tall, whereas the page is taller than it is wide. You should use the page rectangle size that the user has chosen in order to format the document. (See “The Print Record and the Printing Loop” on page 1-7 for more information about where to find the user’s choices for formatting the document.) Printer Resolution Resolution is the degree of clarity of your display device, whether a screen or a printer. A monitor has better resolution than a television set used as a monitor, and a laser printer has better resolution than a dot-matrix printer. Resolution is usually specified in dots per inch, or dpi, in the X and Y directions. The higher the value, the finer the detail of the image.  A printer supports either discrete or variable resolution. Discrete resolution means that the application can choose from a limited number of resolutions predefined by the printer driver. For example, the ImageWriter printer supports four discrete resolutions: 72 ¥ 72 dpi, 144 ¥ 144 dpi, 80 ¥ 72 dpi, and 160 ¥ 144 dpi.  Variable resolution means the application can define any resolution within a range bounded by maximum and minimum values. The LaserWriter printer driver supports variable resolution within a range from 25 dpi to 1500 dpi in both the X and Y directions. (However, a LaserWriter printer that uses PostScript supports a maximum resolution of 300 ¥ 300 dpi. Some other PostScript devices that use the LaserWriter printer driver can achieve higher resolutions, up to the maximum supported by the LaserWriter driver.) In order to print, your application does not need to check the resolutions available or set the resolution. However, if your application does factor in possible resolutions, it can obtain the best quality output from a printer choosing equal resolutions for the X and Y directions. Some devices support X and Y resolutions that are not equal, but using this type of resolution usually results in a distortion of the printed image. For information on how to determine the available resolution or resolutions for the currently selected printer, see “Determining the Resolution of the Current Printer” on page 1-17. About the Printing ManagerIn order to print, your application first uses the Printing Manager to open the printer driver. You then prepare the document for printing by formatting it as necessary for the page size that the user has selected. When you print, you draw the document using QuickDraw routines into the printing grafPort. The Printing Manager gives you a  printing grafPort when you open a document for printing. The printing grafPort data type is a QuickDraw grafPort with additional fields that customize it for printing. (You must check for the type of grafPort data type, because it may be a color grafPort data type.) The TPPrPort data type defines the printing grafPort record.     TYPE                    TPPrPort            =    ^TPrPort;                    TPrPort            =    RECORD                gPort: GrafPort;                        {grafPort to draw in }                gProcs: QDProcs;                        {drawing routines of the printer driver}                { more fields for internal use }END;You print text and graphics by drawing into this port with QuickDraw calls, just as if you were drawing on the screen. (The printer driver installs its own versions of QuickDraw’s low-level drawing routines in the gProcs field of the printing grafPort data type, causing your higher-level QuickDraw calls to drive the printer instead of drawing on the screen. You should store your versions of QuickDraw routines in the gProcs field of the gPort field of the grafPort data type.)  Once you have drawn the document in the printing grafPort, the printer driver takes over, translating the QuickDraw calls for the printer. The printer itself does nothing except draw the document on a page, exactly as the printer driver directs it. The User’s Formatting InputThe user gives you the information on how to format and print a document—for example, the dimensions of the page, the pages of the document that should be printed, the number of copies—through two standard dialog boxes: the style dialog box and the job dialog box. The style dialog box lets the user specify the dimensions of the paper rectangle and any options that affect the image to be printed, which is the information you need to format the document. Your application can customize the style dialog box to ask for additional information. Figure 1-2 shows a sample style dialog box for the LaserWriter SC printer. Your application should present the style dialog box when the user chooses the Page Setup command from the File menu. A sample style dialog box The job dialog box lets the user specify how to print the document this time, such as the print quality (whether high-quality or draft-quality), the type of paper feed (such as paper tray or manual), the range of pages to print, and the number of copies. Your application can customize the job dialog box to ask for information beyond these topics. Figure 1-3 shows a sample job dialog box for the LaserWriter SC printer. Your application should present the job dialog box when the user chooses the Print command from the File menu. A sample job dialog box The Print Record and the Printing LoopIn order to print a document, you need a print record. The print record, of type TPrint (see page 1-30) contains the Printing Manager version, information about the printer (such as its resolution in dpi), the dimensions of the paper rectangle, and the specifications the user made in the style and job dialog boxes.  The print record has several subrecords. The printer information subrecord, of type TPrInfo (see page 1-31), gives you the information needed for page composition, including the vertical and horizontal resolution of the printer in dpi and the boundaries of the page rectangle (which is determined in the style dialog box, discussed on page 1-6). The printing job subrecord, of type TPrJob (see page 1-31), gives you information about a particular printing job; for instance, the first and last pages to be printed, the number of copies, and the method of printing the Printing Manager will use. The user sets its contents using the job dialog box.   Your application should not change the data in the print record—be sure to use the standard dialog boxes to set this information. The only fields you may need to set directly are some containing optional information in the printing job subrecord (for example, the pointer to the idle procedure). Attempting to set other values directly in the print record can produce unexpected results. <36pt\>\x12 <8bat\>s  Your application should contain a printing loop, which is where all the printing needs are handled, including presenting the job dialog box and determining the range of pages to be printed. In the printing loop, you open the Printing Manager, initialize a grafPort data type for the document (“open” the document), and calculate the bounding rectangle for one page of the document (“open” a page). Each page needs to be opened and closed before you can handle any subsequent page of the document, so that you can determine exactly how much information of the document fits on each page. When you are through with the pages, you then close the document and close the Printing Manager before ending. You must always issue the closing routine that matches any opening routines (for instance, PrOpenDoc and PrCloseDoc), even if the user has aborted printing or if an error is returned by the open calls. An example of a printing loop is shown in Listing 1-1 on page 1-12.The Idle ProcedureYou can designate an idle procedure to be run whenever the Printing Manager has directed output to the printer. It stops running once the entire document has been sent to the printer and does not run while the printer actually prints. The idle procedure takes no parameters and returns no result; the Printing Manager simply runs it at every opportunity. Some applications use the idle procedure to produce a dialog box, such as the one in Figure 1-4, on the screen that informs the user that the document is printing and the Command-period command will cancel printing. A sample idle procedureIf you don’t designate a idle procedure, the Printing Manager uses its default idle procedure. The printing job subrecord of the print record contains a pointer to the idle procedure in the PIdleProc field.  For more information about what to be aware of when creating a idle procedure, see “Writing an Idle Procedure” on page 1-25.     Using the Printing ManagerYou can use the Printing Manager to print documents, to display and alter the printing dialog boxes, and to handle printing errors. The Printing Manager provides routines that give your application device-independent control over the printing process. All printable documents must have a print record. Each print record contains information about page size, number of copies requested, and the pages the user wants printed, among other things. You should store this print record with the document so that you can save the user’s preferences. To print a user’s document, first create or validate the document’s print record. Then you should have a printing loop that handles printing and checks for printing errors at every step.  You should never assume what type of printer has been selected; that is, your application should always be able to print to any type of printer. To use the Printing Manager, you must first initialize QuickDraw, the Font Manager, the Window Manager, the Menu Manager, TextEdit, and the Dialog Manager. The first Printing Manager routine to call is PrOpen; the last routine to call is PrClose.Creating and Using the Print RecordIn order to print a document, you need a valid print record that is formatted for the current versions of the Printing Manager and the printer driver. The print record has information such as the vertical and horizontal resolution of the printer in dpi, the boundaries of the page rectangle, the number of copies, and the method of printing the user has requested.To create a new print record, you must first create a handle to it with the Memory Manager function NewHandle. You then must fill the fields of the record with appropriate values; for example, use PrintDefault to set the fields to the default values stored in the printer driver. prRecHdl := THPrint(NewHandle(SIZEOF(TPrint)));PrintDefault(prRecHdl);You can use an existing print record (for instance, one saved with a document). If you use an existing print record, be sure to call the PrValidate function before using the print record to make sure it’s valid for the current version of the Printing Manager and for the currently installed printer. You should save the print record when the user closes the document. This saves any preferences that the user has selected for printing that document, such as orientation of the page or page size. Many of the fields in the print record are reserved for use by Apple and they are likely to change without notice. Also, every printer driver uses the fields of the print record differently. In order to maintain compatibility with the Printing Manager, there are some guidelines you should follow:n    Do not test for the contents of undocumented fields.n    Do not set fields in the print record directly.n    You should use the existing print dialog boxes, or, if you want to customize them, alter them only as recommended in “Altering the Style or Job Dialog Box” on page 1-23.Printing a DocumentThe printing loop calls all the Printing Manager routines necessary to print a document. The general printing loop shown in Listing 1-1 is an extremely broad example of a printing loop—for example, the code does not optimize for the type of  printer being used nor for the material being printed (text, graphics, or a mixture of both). However, it does cover the major aspects of what is needed in a printing loop: the balance of open and close calls, determining page count, and providing support for documents longer than the maximum named by the Printing Manager constant iPFMaxPgs. The printing loop starts by getting a pointer to the current grafPort. Then it calls a routine, MyUnloadTheWorld, that swaps out code segments not required during printing. (The specifics of this routine are left up to the individual application.) At this point, it opens the Printing Manager, printer driver, and printer resource file for use by calling PrOpen.The loop saves the driver’s resource file so that if your idle procedure changes the resource chain in any way, the driver does not lose its resources. (See “Writing an Idle Procedure” on page 1-25.) The PrintDefault procedure fills the print record with the default values specified by the current printer driver; the user may change these values with the style and job dialog boxes. In order to print the document, you must divide the data into sections that fit within the page rectangle dimensions set by the user in the style dialog box and stored in the rPage field of the printing job record. The MyDetermineNumOfPages function must be specific to the application, because the way the application divides up the data depends on the type of text and graphics in the document. After determining the number of pages, the printing loop presents the user with the job dialog box. The user’s responses here provide information such as the number of the copies and the page numbers of the first and last pages requested. The loop stores these values in local variables such as firstPage and lastPage. It then resets the values of the first and last pages in the printing job record as 1 and 9999 (using the constant iPrPgMax). The loop compares the values of the number of pages in the document with the last page the user requested. If the user has requested the printing loop to print page 50 of a two-page document, the printing loop resets the value of the last page to 2. This avoids printing errors later on in the loop.  At this point, the loop begins the process of sending the pages off to be printed. It puts up the dialog box of the idle procedure and restores the printer driver’s resource chain. Once in the page loop, the printing loop checks to see if the size of the file is greater than the maximum number of pages that can be printed (given by the constant  iPFMaxPgs). If the user has chosen immediate printing, your application can print iPFMaxPgs number of pages and then begin the printing loop again with the next section of the document. If the user has chosen deferred printing and the file is larger than iPFMaxPgs, the loop closes the document and sends the first 128 pages to a spool file to be printed. You then must go back and print the next portion of the document. You can print any number of iPFMaxPgs pages, provided you only send that many at any one time. The loop then opens a page for printing and draws the page in the printing grafPort with the MyDrawStuff procedure, the details of which are specific to the application. In this loop, the parameters contain the size of the page rectangle, the grafPort selected, and the page number to be printed. The application can use the same code to print a page of a document as it uses to draw the same page on screen. When the loop is finished printing, it closes the document. If the user has selected spool printing, you call the PrPicFile procedure, which sends the spool file to the printer driver. The printing loop then closes the Printing Manager, reports any Printing Manager errors, and resets the grafPort record to the original port. At the end of the printing loop, all open routines to the Printing Manager are balanced with close routines. This is extremely important to do, even if you stop printing because of an error. Failure to call the matching close calls can cause the Printing Manager to perform incorrectly.Note that every section of the procedure calls PrError after each Printing Manager routine. If an error is found, the loop calls a close routine (for instance, PrClose or PrCloseDoc) for any Printing Manager open routines (PrOpen or PrOpenDoc) before alerting the user of the error. You should use this approach in your own application to make sure the Printing Manager closes properly and all temporary memory is released. A sample print loop{ Below is a general print loop.  The code makes no assumption about }{ what printer is being used nor does it take advantage of what's }{ being printed; text, graphics, whatever.  Depending on how you }{ implement your own print loop for your application, you can make }{ it robust with print status dialogs and idle procs or simpler }{ without them.  You must remember to balance the open and close }{ calls to the Printing Manager.  Failure to do so can cause the }{ Printing Manager to not perform correctly. }PROCEDURE MyPrintLoop;VAR    copies:                        Integer;    firstPage:                        Integer;    lastPage:                        Integer;    numberOfCopies:                        Integer;    pageNumber:                        Integer;    printResFile:                        Integer;    printError:                        Integer;    numberOfPages:                        Integer;    oldPort:                        GrafPtr;    theStatus:                        TPrStatus;    BEGIN    GetPort(oldPort);        {MyUnloadTheWorld is your routine to swap out unneeded segments that }    { are not required during print time.  Your print code must be in a }    { separate code segment.  You need to do this for memory considerations.}        MyUnLoadTheWorld;        PrOpen;    IF (PrError = noErr) THEN    BEGIN        {Save the current resource file so the driver will not }        { lose its resources upon return from pIdleProc.}                printResFile := CurResFile;                PrintDefault(gPrintRec);        IF (PrError = noErr) THEN        BEGIN            {MyDetermineNumOfPages is your routine that determines }            { the number of pages contained in the document by }            { comparing the size of the document with rPage, the }            { printable area for the currently selected printer. }            { It returns the number of pages required to print the }            { document.  This routine is specific to the individual }            { application.}                            numberOfPages := MyDetermineNumOfPages(gPrintRec^^.prInfo.rPage);                        IF (PrJobDialog(gPrintRec)) THEN            BEGIN                {Get the number of copies along with the first }                { and last pages of the document that the user }                { wants printed.  Also, pretend you are going }                { to print the entire document.}                numberOfCopies := gPrintRec^^.prJob.iCopies;                firstPage := gPrintRec^^.prJob.iFstPage;                lastPage := gPrintRec^^.prJob.iLstPage;                gPrintRec^^.prJob.iFstPage := 1;                gPrintRec^^.prJob.iLstPage := iPrPgMax;                                {Determine the "real" number of pages contained }                { in the document. Without this test, you could }                { print up to iPrPgMax pages, or at least try to.}                  IF (numberOfPages < lastPage) THEN lastPage := numberOfPages;                                {Install and call your "Print Status Dialog" here. }                { For example: }                { printStatusDlg := GetNewDialog(257, NIL, pointer(-1)); }                { gPrintRec^^.prJob.pIdleProc := @checkMyPrintDlgButton;}                                    {Print the number of copies of the document }                { requested by the user from the print job dialog.}                                FOR copies := 1 TO numberOfCopies DO                BEGIN                    {Restore the printer driver's resource file.}                    UseResFile(printResFile);                    {Print the range of pages of the document }                    { requested by the user from the job dialog.}                                        FOR pageNumber := firstPage TO lastPage DO                    BEGIN                        {Check for max size of spool file.  If it is larger than }                        { a multiple of 128, then close the doc, initiate }                        { printing, and reopen the doc.  Notice that the }                        { IF statement is always true the first time through, }                        { thus ensuring the doc is always opened.}                                                    IF (pageNumber - firstPage) MOD iPFMaxPgs = 0 THEN                        BEGIN                            IF pageNumber <> firstPage THEN                            BEGIN                                PrCloseDoc(gPrinterPort);                                IF (gPrintRec^^.prJob.bJDocLoop = bSpoolLoop) AND                                    (PrError = noErr) THEN                                    PrPicFile(gPrintRec, NIL, NIL, NIL, theStatus);                            END;                            gPrinterPort := PrOpenDoc(gPrintRec, NIL, NIL);                        END;                        IF (PrError = noErr) THEN                        BEGIN                            PrOpenPage(gPrinterPort, NIL);                            IF (PrError = noErr) THEN                            {The rPage field of the prInfo record is the }                            { printable area for the currently selected }                            { printer. If you send the current port, your }                            { app can use the same routine to draw to}                            { the screen and the printer's GrafPort. }                                                        MyDrawStuff (gPrintRec^^.prInfo.rPage,                                            GrafPtr(gPrinterPort), pageNumber);                            PrClosePage(gPrinterPort);                        END;                    END;                    PrCloseDoc(gPrinterPort);                    IF (gPrintRec^^.prJob.bJDocLoop = bSpoolLoop) AND                        (PrError = noErr) THEN                        PrPicFile(gPrintRec, NIL, NIL, NIL, theStatus);                END;            END;        END;    END;        {Get the error before PrClose or the error disappears.}        printError := PrError;    PrClose;        {You do not want to report any printing errors until you have fallen }    { through the printing loop. This will make sure that ALL of the Print }    { Manager's open calls have their corresponding close calls, thereby }    { enabling the Print Manager to close properly and that all temporary }    { memory allocations are released.}   IF (printError <> noErr) THEN DoError(ePrint, printError);    SetPort(oldPort);END;Printing From the FinderTo print a document from the Finder, the user selects the document’s icon and chooses the Print command from the File menu. When the Print command is chosen, the Finder starts up the application and passes information to it indicating that the document is to be printed rather than opened on the screen. Your application should then do the following, preferably without going through its entire startup sequence:    1.    Call the PrJobDialog function, described on page 1-43. If the user selected more than one document, you can use the PrJobMerge function, described on page 1-46, to apply the results of one job dialog box to all of the documents.    2.    Print the document or documents. Most applications open the document on the screen while printing. Although this is not necessary, it is helpful to the user. You can also print from the Finder using the pDoc Apple event. See the chapter “Finder Interface” in the <italics\>Operating System volume of Inside Macintosh for more information about how to print from the Finder.   Printing Each Page as a Separate DocumentSome applications use a method of printing that prints out each page of a spooled document as a separate print job in order to avoid running out of disk space while spooling the document to disk. You should not use this method, known as “spool a page, print a page,” because it only works for a printer directly connected to the user’s computer (and not to a network) and therefore creates device dependence, and because it’s extremely slow. If the printer is a remote or shared device (such as a LaserWriter printer or an ImageWriter printer connected by AppleTalk), another application could print a document between the pages of your user’s document. At worst, if both applications printing to the shared printer use the “spool a page, print a page” method, the printed documents could end up interleaved. The pages for one of the documents could be out of order, even when printed by itself. Printing From the Low-Level InterfaceThe low-level interface is the set of routines that use the Device Manager directly to print. Some printer drivers converts the routines in the low-level interface into their equivalents in the high-level interface, so you won’t gain a speed advantage by using the low-level routines. In fact, your code may run slower. The low-level interface is used primarily on the ImageWriter printer for printing text and graphics.If you want to use the low-level interface, you should use the code in Listing 1-2, so that the Printing Manager can properly convert the low-level calls to the high-level interface. Printing a page using the low-level interfacePrDrvrOpen;                                {opens the printer driver}PrCtlCall(iPrDevCtl, lPrDocOpen, 0, 0); {opens the document}PrCtlCall(iPrDevCtl, lPrPageOpen, 0, 0); {opens the page}                    {Here you send the data to be printed}PrCtlCall(iPrDevCtl, lPrPageClose, 0, 0); {closes the page}PrCtlCall(iPrDevCtl, lPrDocClose, 0, 0); {closes the document}PrDrvrClose;                                {closes the printer driver}The routines in the low-level interface are documented in “Low-Level Routines” on page 1-56 and “Low-Level Control Calls” on page 1-58. Checking for PrGeneralThe PrGeneral procedure (described on “Optimizing Printing” on page 1-51) allows you to determine the resolution of the printer, set the resolution you want, find out if the user has selected landscape printing, or force draft-quality printing. You call the PrGeneral procedure with one of five opcodes: GetRslDataOp, SetRslOp, GetRotnOp, DraftBitsOp, or NoDraftBitsOp. Four of these opcodes have data structures associated with them. (The fifth, NoDraftBitsOp, serves to reverse the effect of the DraftBitsOp opcode and so does not have its own data structure.) Not all printer drivers have implemented the PrGeneral procedure however, so your code can’t depend on being able to use it. Listing 1-3 shows how to check to see whether the current printer driver has implemented the PrGeneral procedure. In Listing 1-3, the current printing error is set to 0 or noErr. The opcode field of the page orientation record (type TGetRotnBlk) is set to the getRotnOp opcode, which is the opcode to determine if the user has chosen landscape orientation. The code passes the address of the page orientation record to the PrGeneral procedure. The code then calls PrErr to get any errors that result from calling PrGeneral. If the error is opNotImpl, the printer driver does support PrGeneral but not that particular opcode. If the error is resNotFound, the printer driver does not support PrGeneral.  The code then sets the function result to FALSE.    Checking for the PrGeneral procedureFUNCTION DoIsPrGeneralThere: Boolean;VAR    getRotRec:    TGetRotnBlk;    myPrintErr:    OsErr;    BEGIN    myPrintErr := 0;    getRotRec.iOpCode := getRotnOp;    getRotRec.hPrint := myPrRecHdl;    PrGeneral(@getRotRec);    myPrintErr := PrError;    PrSetError(noErr);    IF (myPrintErr = noErr) THEN DoIsPrGeneralThere := TRUE    ELSE        IF (myPrintErr = OpNotImpl) THEN        { PrGeneral is supported but this opcode isn't. }            DoIsPrGeneralThere := TRUE        ELSE            IF (myPrintErr = resNotFound) THEN            { PrGeneral isn't supported by the current printer driver. }                DoIsPrGeneralThere := FALSE;END;Determining the Resolution of the Current PrinterSome printer drivers support one of two possible kinds of resolution: discrete or variable. You can use the PrGeneral procedure (page 1-51) to determine the kind of resolution supported by the current printer and then use the highest  resolution desired by the application or the user. Each printer has its own unique imaging capabilities. When you call PrGeneral with the value GetRslDataOp for the opcode field of the parameter block, the Printing Manager returns the resolutions that the printer supports. Figure 1-5 shows the get-resolution records (type TGetRslBlk) returned by the LaserWriter and ImageWriter printer drivers. Both contain all the fields of the TGetRslBlk data type, but the LaserWriter record has values for the X and Y resolution range fields and only one resolution record, whereas the ImageWriter record has a value of 0 in the X and Y resolution range fields and four resolution records. Resolutions for LaserWriter and ImageWriter printersYou can also set the imaging resolution you want to use. You call PrGeneral with the value SetRslOp for the opcode field of the parameter block and the resolutions in the X and Y directions you want to use via the set-resolution record (page 1-37). The Printing Manager returns the result code noErr if it has updated the print record with this new resolution, or noSuchRsl if the current printer doesn’t support this resolution.Listing 1-4 illustrates how to use the PrGeneral procedure to determine the possible resolutions for the current printer and then set the printer to the desired resolution.Using the GetRslDataOp and SetRslOp opcodes with PrGeneralFUNCTION DoSetMaxResolution (thePrRecHdl: THPrint): Integer;VAR        maxDPI:                Integer;        resIndex:                Integer;        getResRec:                TGetRslBlk;        setResRec:                TSetRslBlk;BEGIN        maxDPI := 0;        getResRec.iOpCode := getRslDataOp;        PrGeneral(@getResRec);                {At this point, we have an array of possible resolutions in the }        { getResRec variable. After checking for errors, we loop through }        { each resolution range record looking for the highest resolution }        { available where x and y are equal.  This loop makes no }        { assumptions about the order of the resolution records.}                IF (getResRec.iError = noErr) AND (PrError = noErr) THEN        BEGIN            FOR resIndex := 1 TO (getResRec.iRslRecCnt) DO            BEGIN                IF (getResRec.rgRslRec[resIndex].iXrsl =                    getResRec.rgRslRec[resIndex].iYrsl) AND                    (getResRec.rgRslRec[resIndex].iXrsl > maxDPI) THEN                    maxDPI := getResRec.rgRslRec[resIndex].iYrsl;            END;                        {We now have the desired resolution, set it.}                        IF maxDPI <> 0 THEN            BEGIN                WITH setResRec DO                BEGIN                    iOpCode := setRslOp;                    hPrint := thePrRecHdl;                    iXRsl := maxDPI;                    iYRsl := maxDPI;                END;                PrGeneral(@setResRec);            END;                        IF (setResRec.iError = noErr) AND (PrError = noErr) AND                (maxDPI <> 0) THEN DoSetMaxResolution := maxDPI;        END        ELSE DoSetMaxResolution := 0;END;You can reset the original resolutions used by the printer driver by calling the PrGeneral procedure with the SetRslOp opcode a second time. You should save the values contained in the iVRes and iHRes fields of the printer information record before making the first call to PrGeneral. You can also reset the original resolutions by calling the PrintDefault procedure with the print record, which sets all of the fields of the print record to the default values of the current printer resource file. However, if you use PrintDefault you lose all of the selections from the last time the user used the style dialog box.  (You may want to set the original resolution because that may be the printer’s best resolution, though not its highest.)If, based on the information you get with a call to PrGeneral using the GetRslDataOp opcode, you decide to change the resolution with a call to PrGeneral using the SetRslOp opcode, the Printing Manager may need to change the appearance of the style and job dialog boxes, disabling some items. (The appearance of the dialog boxes and which items are disabled is up to the printer driver.) Therefore, you should determine and set the resolution before you present the Printing Manager dialog boxes to the user.   Determining Page OrientationAt times it can be useful for your application to determine which page orientation the user selected in the style dialog box. For instance, if an image only fits on a page if it is printed in landscape orientation and the user has not selected landscape orientation, your application can remind the user to select this orientation before printing. Otherwise, the user gets a clipped image. If you call the PrGeneral procedure with the GetRotnOp opcode, the Printing Manager returns a handle to the current print record and a Boolean variable that says whether or not the user has selected landscape orientation. Because the user should have already selected the type of orientation when you check this value, you should not call PrGeneral with the GetRotnOp opcode until after you present the style dialog box to the user. Listing 1-5 illustrates how to determine whether the user has selected landscape orientation for the current document.Using the GetRotnOp opcode with the PrGeneral procedure to determine page orientationFUNCTION DoIsLandscapeModeSet (thePrRecHdl: THPrint): Boolean;VAR                GetRotRec:    TGetRotnBlk;BEGIN                GetRotRec.iOpCode := getRotnOp;                GetRotRec.hPrint := thePrRecHdl;                PrGeneral(@getRotRec);                                IF (GetRotRec.iError = noErr) AND (PrError = noErr) AND                    GetRotRec.fLandscape THEN                    BEGIN                        DoIsLandscapeModeSet := TRUE;                    END                ELSE DoIsLandscapeModeSet := FALSE;END;Choosing Draft-Quality PrintingIf your application needs to print only text or bitmaps, it can increase performance and save disk space by choosing draft-quality printing. The Printing Manager prints the document immediately, rather than spooling it to disk as with deferred printing. On the ImageWriter printer, draft printing produces quick, low-quality drafts. The LaserWriter printer does not print documents in draft-quality.  In order to force draft-quality printing, you can call the PrGeneral procedure with the DraftBitsOp opcode. The DraftBitsOp opcode has no effect if the printer does not support draft-quality printing (like the LaserWriter printer) or does not support deferred printing.If you want to force draft-quality printing, you should call PrGeneral with the DraftBitsOp opcode before presenting the style and job dialog boxes to the user, particularly when the current printer is an ImageWriter printer. The use of the DraftBitsOp opcode disables the landscape icon in the style dialog box and the Best and Faster options in the job dialog box. Listing 1-6 illustrates how to force draft-quality printing.Using the DraftBitsOp opcode with the PrGeneral procedure to force draft quality printingFUNCTION DoDraftBits(thePrRecHdl: THPrint): Boolean;VAR                draftBitsBlk:    TDftBitsBlk;BEGIN                draftBitsBlk.iOpCode := draftBitsOp;                draftBitsBlk.hPrint := thePrRecHdl;                PrGeneral(@draftBitsBlk);                IF (draftBitsBlk.iError = noErr) AND (PrError = noErr) THEN                    DoDraftBits := TRUE                                { draft printing is on }                ELSE DoDraftBits := FALSE;                                    { draft printing is NOT on }END;You can call PrGeneral with the NoDraftBitsOp opcode to turn off the effects of the DraftBitsOp opcode, as shown in Listing 1-7. If you call PrGeneral with NoDraftBitsOp without first calling it with DraftBitsOp, the procedure does nothing. As with the DraftBitsOp opcode, you should call PrGeneral with the NoDraftBitsOp opcode before you present the style and job dialog boxes to the user. Using the NoDraftBitsOp opcode with the PrGeneral procedure to turn off draft quality printingFUNCTION DoNoDraftBits(thePrRecHdl: THPrint): Boolean;VAR                draftBitsBlk:    TDftBitsBlk;BEGIN                draftBitsBlk.iOpCode := nodraftBitsOp;                draftBitsBlk.hPrint := thePrRecHdl;                PrGeneral(@draftBitsBlk);                    IF (draftBitsBlk.iError = noErr) AND (PrError = noErr) THEN                    DoNoDraftBits := TRUE            { draft printing is NOT on }                ELSE DoNoDraftBits := FALSE;        { draft print is on }END;Altering the Style or Job Dialog BoxThe standard style and job dialog boxes that the printer resource file provides for the LaserWriter printer are shown on page 1-7. Each dialog box has options that the user can set. If you want to use the standard style or job dialog box, call the PrStlDialog function (page 1-43) or PrJobDialog (page 1-43) function . You may wish to add some additional options to these dialog boxes so that the user can customize the printing process even further. However, there are strict guidelines about altering style or job dialog boxes:n    If you want to add items to the current dialog box, add them only at the end of the list. Do not delete items from the existing item list, rearrange them, or add new items in the middle of the list. n    The additional options should be below the standard ones in the dialog box, leaving the standard ones unchanged. n    Don’t count on an item retaining its current position on the screen or in the dialog item list in the code.n    Don’t use more than half the smallest screen height for your items. Apple reserves the right to expand the items in the standard dialog boxes to fill the top half of the screen.n    If you want to add a lot of items to the dialog boxes, be aware this may confuse users. You should consider having your own separate dialog box in addition to the existing Printing Manager dialog boxes. n    Dialog boxes may actually be color windows, which may affect your code somewhat.If you want to modify either of the Printing Manager dialog boxes, you need to change the printing dialog box record (page 1-39). This record contains a pointer to the dialog box’s window, a pointer to the dialog event filter, and a pointer to procedures for evaluating dialog items, and a handle to the current print record. A dialog event filter is a function that extends the Dialog Manager’s event-handling functionality. When your application displays the style or job dialog box, you can use an event filter to handle events that the Dialog Manager doesn’t handle—such as update events in background applications or the Command-period key-down event. The dialog hook in the pItemProc field is analogous to the Standard File dialog hook: it tells you which item of which dialog box the user has selected, and you can handle the item or the printer driver can handle the item if it’s one of the original items of the dialog box.      TPrDlg = RECORD                Dlg:                DialogRecord;                             {Ptr to the dialog box}                pFltrProc:                ModalFilterProcPtr;                            {The dialog event filter}                pItemProc:                PItemProcPtr;                            {The item evaluating proc.}                hPrintUsr:                THPrint;                            {The print record}                fDoIt:                Boolean;                            {Reserved by Apple}                fDone:                Boolean;                            {Reserved by Apple}                lUser1:                LongInt;                            {Reserved by Apple}                lUser2:                LongInt;                            {Reserved by Apple}                lUser3:                LongInt;                            {Reserved by Apple}                lUser4:                LongInt;                            {Reserved by Apple}                END;If you want to customize a style or job dialog box, first call the initialization function for a pointer to that dialog box. The PrStlInit function (page 1-45) returns a handle to the standard style dialog box; the PrJobInit function (page 1-45) returns a handle to the standard job dialog box. Then you can call the PrDlgMain function (page 1-44) with the address of your own initialization function. The program DoModifyDialogs, given in Listing 1-8, modifies the job dialog box. The Print function calls the PrJobInit function and stores the handle to the job dialog box it returns in the variable PrtJobDialog. The Print function then calls the PrDlgMain function with the address of the program’s initialization function, MyJobDlgInit. The MyJobDlgInit function fills in the fields of the printing dialog box record, appends the customized dialog items onto the dialog box, replaces the original item handler with the customized item handler, and returns the modified job dialog box to the Print function. The customized dialog item handler is in the MyJobItems procedure. Note that your item handler must call the original item handler, so that the Printing Manager can handle original items in the dialog box.Please note that your dialog hook must call the standard dialog hook to handle all of the standard dialog’s original items. If you wish to have an event filter, handle it the same way that you do a dialog hook. The code  in Listing 1-8 works for the style dialog box if you replace all of the functions specific to the job dialog box with those specific for the style dialog box.<36pt\>\x12 <8bat\>uAdding items to a job dialog boxSee the chapter “Dialog Manager” in the Inside Macintosh: <italics\>Macintosh Toolbox for more information about dialog boxes, dialog items, and filter procedures. See the chapter “Standard File Package” in the Inside Macintosh: <italics\>Operating System volume for more information about the Standard File dialog hook. Writing an Idle ProcedureThe Printing Manager runs the idle procedure while it sends a document to the printer. (See “The Idle Procedure” on page 1-8.) The Printing Manager’s default idle procedure allows the user to cancel printing. The procedure just polls the keyboard and sets a Printing Manager error code if the user types Command-period (to cancel the printing job). If you use the default procedure, you should display a dialog box during printing to inform the user that the Command-period command is available.If you choose to write your own idle procedure instead of using the default Printing Manager procedure, there are several guidelines you must follow:n    If you designate an idle procedure, you must set the PIdleProc field of the print record after presenting the dialog boxes, validating the print record, and initializing the fields in the printing record, because the routines that perform these operations reset the PIdleProc field to NIL. n    You must install your idle procedure in the print record before calling the PrOpenDoc procedure. Otherwise, the printer driver does not give the idle procedure any time. You install a pointer to your procedure in the pIdleProc field of the printing job subrecord (page 1-31). n    Do not attempt any printing from within the idle procedure, because the Printing Manager is not reentrant.n    You must call WaitNextEvent to capture mouse clicks or the Command-period sequence that signals the user wants to cancel printing.n    Don’t call the QuickDraw OpenPicture function or DrawPicture procedure. n    You must save the printer’s grafPort upon entry to the idle procedure and restore it upon exit if you draw anything within the idle procedure. If you don’t, the printer driver draws into the grafPort of your dialog box instead of its own grafPort. To save the printer’s grafPort, call the GetPort procedure when entering the idle procedure. Before you exit, call the SetPort procedure to set the port back to the printer driver’s grafPort. (The GetPort and SetPort procedures are described in the chapter “QuickDraw”.)n    If your idle procedure changes the resource chain, you should save the printer driver’s resource chain by calling the CurResFile function and saving the ID of the printer driver’s resource file at the beginning of your idle procedure. (Any routine that changes the value of the global variable TopMapHdl, such as the OpenResFile function or the UseResFile procedure, changes the resource chain. Some printer drivers assume the resource chain does not change, and you may get an error if you do change it.) When you exit for from the idle procedure, restore the resource chain with the UseResFile procedure. If you are not changing the resource chain, you do not need to save the resource chain. (CurResFile, OpenResFile, and UseResFile are described in the chapter “Resource Manager” of Inside Macintosh: <italics\>Operating System.)n    Avoid calling the PrError function within the idle procedure. Errors that occur while it is executing are usually temporary and serve only as internal flags for communication within the printer driver, not for the application. If you absolutely must call PrError within your idle procedure and an error occurs, do not cancel printing. Wait until the last called printing procedure returns and then check to see if the error still remains. For information about installing a procedure to handle requests to cancel printing or pause printing, see “Canceling or Pausing the Printing Process” on page 1-28.  Optimizing PrintingQuickDraw is the primary means you use in order to print, and in general you can use QuickDraw in the printing grafPort exactly as you would for a screen grafPort. There are a few things to note when drawing to the printing grafPort: n    With each new page, you get a completely reinitialized grafPort, so you’ll need to reset font information and other grafPort characteristics as desired.n    Don’t make calls that don’t do anything on the printer. For example, erase operations are quite time-consuming and normally aren’t needed on the printer.n    Don’t use clipping to select text to be printed. There are a number of subtle differences between how text appears on the screen and how it appears on the printer; you can’t count on knowing the exact dimensions of the rectangle occupied by the text.n    Don’t use fixed-width fonts to align columns. Since spacing gets adjusted on the printer, you should explicitly move the pen to where you want it.n    Don’t use the Outline text style to create white text on a black background.n    Avoid using the QuickDraw erase calls (for example, EraseRect).  An erase routine takes time because every bit (90,000 bits per square inch) has to be cleared.  Erasing is unnecessary because the paper does not need to be erased the way the screen does. Avoid using the TextBox procedure, which makes calls to the EraseRect procedure.  You might want to use a different method of displaying text (for example, DrawString or DrawText) or write your own version of TextBox.n    Avoid changing fonts frequently.  n    Because of the way rectangle intersections are determined, if your clip region falls outside of the rectangle given by the rPage field of the printer information subrecord of the print record, you slow down the printer substantially.Optimizing PostScript PrintingWhile your printing code should be device-independent, you can optimize it for a LaserWriter printer that uses PostScript. (You cannot be sure that the current printer is a PostScript printer, so you may need to send down two or more versions of the same file: one for a PostScript printer, one for a QuickDraw printer.) For printing to a PostScript printer, you’ll need to observe the following limitations:  n    Regions aren’t supported; try to simulate them with polygons or bitmaps. n    Clipping regions should be limited to rectangles. PostScript clips non-square patterns to squares. n    The invert data type, part of the QuickDraw grafverb data type, is not supported by the PostScript LaserWriter printer driver. n    Transfer modes are ignored for all QuickDraw objects except 1-bit bitmaps. With 1-bit bitmaps, srcCopy, srcOr, srcBic, notSrcCopy, and notSrcBit are drawn. The copy transfer mode is the only transfer mode supported for all objects except text and bit images. n    There can be a small difference in glyph widths between fonts rendered on the screen and on the printer. Only the endpoints of text strings are the same. n    PostScript does not support color patterns that use colors other than red, green, blue, cyan, yellow, magenta, white, and black. n    The printer may print some large patterns at half or smaller sizes, depending on its resolution. n    Polygons and smoothed polygons that result in the creation of paths larger than the limit of the PostScript printer (typically 1500 or 3000, depending on the version of PostScript) result in a PostScript error.Although the LaserWriter is relatively fast, there are some techniques an application can use to ensure its maximum performance.n    Printing patterns takes time, because the bitmap for the pattern has to be built.  The patterns black, white, and some of the gray patterns have been optimized to use the PostScript gray scales.  Remember that when your application sends a document to the LaserWriter printer, it must use immediate printing and cannot use deferred printing; your print code, the document’s data, and the printer driver have to be in memory simultaneously. In order to ensure that you have enough memory available to load the LaserWriter printer driver’s code, you should have all the code you need for printing in a separate segment and unload everything else. For information on offscreen bitmaps, the grafverb data type, transfer modes, and the routines mentioned here, see the chapter “QuickDraw”. For more information on PostScript, see the PostScript Language Reference Manual, available from Addison-Wesley. Providing Names of Documents Being PrintedSome printers (usually those that are shared between many users, like the LaserWriter printer) can provide the names of the users who are printing and the documents that are being printed to others interested in using the printer. Providing the names of users and documents is a courtesy to other users on the network. The Printing Manager gets the name of the document being printed from the title on the frontmost window on the user’s screen. The PrOpenDoc and PrValidate procedures call the FrontWindow procedure to get the document’s name.    The Printing Manager can’t get a document name if your application doesn’t display windows while printing. For example, many applications do not open windows for their documents when the user prints from the Finder. If there is no front window, or if the window’s title is empty, the Printing Manager defaults to “Unspecified.”You can ensure that the document name is available by putting up a window containing a message like “Press Command–period to cancel printing,” and give it the document’s title. If the window is one that doesn’t have a title bar (like those of type dBoxProc), this title is not displayed. If you don’t want to put up a visible window, you can create a tiny window (for instance, type plainDBox) and hide it behind the menu bar by giving it the global coordinates of (1,1,2,2). See the chapter “The Window Manager” in Inside Macintosh: <italics\>Macintosh Toolbox for information about dBoxProc and plainDBox window types. Do not set the document name in the print record directly. Not all printer drivers support this field, and Apple does not guarantee that internal fields of the Printing Manager’s data structures will remain the same.<36pt\>\x12 <8bat\>u Canceling or Pausing the Printing ProcessIf you install a procedure for handling requests to cancel printing, do not include an option to pause the printing process. Pausing may cause timeout problems when printing to the LaserWriter printer.  Communication between the Macintosh computer and the LaserWriter must be maintained to prevent a job or a wait timeout.  If there is no communication for a period of time (over two minutes), the printer times out and the print job terminates due to a wait timeout.  Because there is no good way to determine the type of printer, you should be aware of the possibility of a LaserWriter printer timing out for a user who wants to pause printing for over two minutes.  Handling Printing ErrorsYou should always check for error conditions while printing by calling the PrError function. Errors returned may include AppleTalk and Operating System errors in addition to Printing Manager errors.Don’t call PrError from within your idle procedure. See “Writing an Idle Procedure” on page 1-25 for more information. If you determine that an error has occurred after the completion of a printing routine, stop printing. Call the close routine that matches any open routine you have called. For example, if you call PrOpenDoc and received an error, skip to the next PrCloseDoc; if you called PrOpenPage and got an error, skip to the next PrClosePage and PrCloseDoc. Remember that if you have called some open procedure, you must call the corresponding closing procedure to ensure that the printer driver closes properly and that all temporary memory allocations are released and returned to the heap. Using Alert or Dialog Boxes to Report ErrorsDo not display any alert or dialog boxes to report an error until the end of the printing loop.  Once at the end, check for the error again; if there is no error assume that printing completed normally.  If the error is still present, then you can alert the user. This technique is important for two reasons.  First of all, if you display a dialog box in the middle of the printing loop, it could cause errors that can terminate an otherwise normal job.  For example, if the printer is an AppleTalk printer, the connection can be terminated abnormally since the driver would be unable to respond to AppleTalk requests received from the printer while the dialog box was waiting for input from the user.  If the printer does not hear from the Macintosh system within a short period of time (anywhere from 30 seconds to 2 minutes, depending on the driver), it assumes that the Macintosh system is no longer there and times out. The timeout results in a prematurely broken connection, causing another error, to which the application must respond. (See “Canceling or Pausing the Printing Process” on page 1-28.)The second reason is that the driver may have already displayed its own dialog box in response to an error.  In this instance, the driver posts an error to let the application know that something went wrong and it should cancel printing.  For example, when the LaserWriter driver detects that the Laser Prep version that has been downloaded to the LaserWriter is different from that with which the user is trying to print, it displays the appropriate dialog box informing the user of the situation and giving the user the option of reinitializing the printer.  If the user chooses to cancel printing, the driver posts an error to let the application know that it needs to cancel printing, but since the driver has already taken care of the error by displaying a dialog box, the error is reset to 0 before the printing loop is complete.  The application should check for the error again at the end of the printing loop, and if it still indicates an error, the application can then display the appropriate dialog box.Interpreting PrGeneral ErrorsIf you are using the PrGeneral procedure, be prepared to receive the following errors:  noSuchRsl, opNotImpl, and resNotFound.  In all three cases, the application should be prepared to continue to print without using the features of that particular opcode.The resNotFound error means the current printer driver does not support the PrGeneral procedure.  This lack of support should not be a problem for your application, but you need to be prepared to deal with this error.  If you receive a resNotFound result code from PrError, clear the error with a call to PrSetError with a value of 0 as the parameter; otherwise, PrError might still contain this error the next time you check it, which would prevent your application from printing.ReferenceThis section describes the data structures, routines, and resources provided by the Printing Manager. The “Data Structures” section shows the Pascal data structures used by the Printing Manager. The “Routines” section describes the routines you can use to print a document, produce or alter a printing dialog box, and handle printing errors. Data StructuresThe data structures of the Printing Manager primarily fall into two groups: the records and subrecords of the print record, and the records used by the PrGeneral procedure. In almost all cases, a field in one of the Printing Manager data structures that is listed as being reserved contains device-dependent information. You should not rely on this information being available or accurate when printing from your application. TPrint   The TPrint record is the print record that every document must have before you can print it. It contains handles to the print information and job subrecords (TPrInfo, described on page 1-31 and TPrJob, described on page 1-31). TPrint = RECORD                iPrVersion: Integer;                            { Printing software version}                prInfo: TPrInfo;                    { the PrInfo data associated with the current style.}                rPaper: Rect;                        { The paper rectangle [offset from rPage]}                prStl: TPrStl;                        {  This print request's style.}                prInfoPT: TPrInfo;                  { Reserved }                prXInfo: TPrXInfo;                    {  Print-time (expanded) Print info record.}                prJob: TPrJob;                    { The Print Job request  Total of the above;                    120-82 = 38 bytes needed to fill 120}                printX: ARRAY [1..19] OF Integer;                    {Spare to fill to 120 bytes!}                END;iPrVersion    The version of the Printing Manager that initialized this print record. It is recommended that you use the PrDrvrVers function (page 1-58) instead if you want to determine the current version of the printer driver; your application may not have updated this print record for the current printer.    prInfo    The information needed for page composition. This record is of type TPrInfo, which is described on page 1-31.rPaper    The paper rectangle. This rectangle encompasses the page rectangle, which is specified by the rPage field of the printer information record, described on page 1-31.prStl    The printer’s device number and the feed type, described on page 1-33.prInfoPT    Reserved by Apple. prXInfo    Reserved by Apple. prJob    Information about this particular printing job. The results of the job dialog box sets its contents. This record is of type TPrJob, which is described on page 1-31. printX    Reserved by Apple.If you try to use a print record that’s invalid for the current version of the Printing Manager or for the currently installed printer, the Printing Manager will correct the record by filling it with default values. You should not alter the contents of the print record directly. TPrInfo   The TPrInfo record is the printer information subrecord of the print record. It contains the vertical and horizontal resolutions of the printer and coordinates of the page rectangle. TPrInfo = RECORD                iDev: Integer;                        {Font mgr/QuickDraw device code}                iVRes: Integer;                        {Resolution of device, in device coordinates}                iHRes: Integer;                    {..note: V before H => compatable with Point.}                rPage: Rect;                {The page (printable) rectangle in device coordinates.}                END;iDev    Reserved by Apple.iVRes    The printer’s vertical resolution in dots per inch. The default value is 72, unless you have made a call to the PrGeneral procedure with the SetRsl opcode (described in “Determining the Resolution of the Current Printer” on page 1-17). iHRes    The printer’s horizontal resolution in dots per inch. The default value is 72, unless you have made a call to the PrGeneral procedure with the SetRslOp opcode. rPage    The page rectangle. This rectangle is inside the paper rectangle, specified by the rPaper field of the print record, described on page 1-30. The style dialog box sets this value. TPrJob  The TPrJob subrecord of the TPrint print record contains information about a particular printing job. The user accepting the contents of the job dialog box or your application calling the PrintDefault procedure (page 1-42) sets its contents.TPrJob = RECORD                iFstPage: Integer;                                  {Page Range.}                iLstPage: Integer;                iCopies: Integer;                                   {Number of copies.}                bJDocLoop: SignedByte;                  {The Doc style: Draft or Spool}                fFromUsr: Boolean;                                 {Reserved}                pIdleProc: PrIdleProcPtr; {Pointer to the background procedure}                pFileName: StringPtr;               {Spool File Name: NIL for default.}                iFileVol: Integer;                                 {Spool File vol, set to 0 initially}                bFileVers: SignedByte;                  {Spool File version, set to 0 initially}                bJobX: SignedByte;                                 {Reserved}                END;iFstPage    The page number of the first page being printed.iLstPage    The page number of the last page being printed. iCopies    The number of copies requested, which is also the number of times your application should send the document to the printer. However, some printer drivers handle multiple copies internally and this value will be 1.bJDocLoop    The printing method that the Printing Manager will use. It will be one of the following predefined constants:                                CONST bDraftLoop = 0;                                {draft printing}                                        bSpoolLoop = 1;                        {spool printing}fFromUsr    Reserved by Apple.pIdleProc    A pointer to the background procedure (described in “The Idle Procedure” on page 1-8) for this printing operation. pFileName    The name of the spool file. This field is initialized to NIL and is should not be changed by your application. This field denotes the default file name (normally 'Print File') stored in the printer resource file.iFileVol    The volume reference number of the spool file. This field is initialized to 0, representing the default volume. You can use the File Manager function SetVol (described in the File Manager chapter of the <italics\>Operating System volume) to change the default volume. bFileVers    The version number of the spool file, initialized to 0. bJobX    Reserved by Apple.TPrStl   The TPrStl record contains the device number of the current printer and the feed type currently selected (paper cassette or manual). All other fields are reserved. TPrStl = RECORD                wDev: Integer;                iPageV: Integer;                iPageH: Integer;                bPort: SignedByte;                feed: TFeed;                END;wDev    The high-order byte contains the device number of the current printer. The low-order byte is reserved.iPageV    Reserved by Apple.iPageH    Reserved by Apple.bPort    Reserved by Apple.feed    The feed type currently selected.  The possible values are:                            TFeed = (feedCut,feedFanfold,feedMechCut,feedOther);TPrStatus   The TPrStatus record is used by the PrPicFile procedure (page 1-50), which you use to print spooled documents. TPrStatus = RECORD                iTotPages: Integer;                             {Total pages in Print File.}                iCurPage: Integer;                             {Current page number}                iTotCopies: Integer;                            {Total copies requested}                iCurCopy: Integer;                             {Current copy number}                iTotBands: Integer;                             {Reserved}                iCurBand: Integer;                             {Reserved}                fPgDirty: Boolean;                             {True if current page has been written to.}                fImaging: Boolean;                             {Reserved}                hPrint: THPrint;                            {Handle to the active print record}                pPrPort: TPPrPort;                             {Ptr to the active PrPort}                hPic: PicHandle;                            {Handle to the active Picture}                END;iTotPages    The total number of pages being printed. This is the same value as the value of iLastPage minus the value of iFirstPage, which are both from the TPrJob record. iCurPage    The sequence number of the page currently being printed. For example, if the user prints pages 10 through 15 of a 20-page document, the value of the iCurPage field for page 10 is 1.  iTotCopies    The total number of copies requested. This value may be different from the value of the field iCopies from TPrJob.  iCurCopy    The number of the current copy being printed. iTotBands    Reserved by Apple. iCurBand    Reserved by Apple. fPgDirty    A flag indicating whether the printer has begun printing the current page. Set to TRUE if there has been any imaging on the current page.fImaging    A flag indicating whether the printer driver is in the middle of a DrawPicture call. hPrint    The handle to the current print record.pPrPort    The pointer to the active printing grafPort data type.hPic    The handle to the active picture. This is used by the printer driver; your application should not alter it. TPrPortThe TPrPort record is the printing grafPort, which contains a handle to a QuickDraw grafPort, among other fields. TPrPort = RECORD                gPort: GrafPort;            {The Printer's grafPort.}                gProcs: QDProcs;            {The procedures for printing in the grafPort}                lGParam1:LongInt;                        {Reserved}                lGParam2:LongInt;                        {Reserved}                lGParam3:LongInt;                        {Reserved}                lGParam4:LongInt;                        {Reserved}                fOurPtr:Boolean;                        {Reserved}                fOurBits:Boolean;                        {Reserved}END;gPort    The Printer’s grafPort.gProcs    Pointers to routines that the printer driver may have designated to take the place of QuickDraw routines. See the chapter “QuickDraw” for more information. You can include a pointer to routines that you would like to include in the grafProcs field of the grafPort data type.  lGParam1    Reserved by Apple. lGParam1    Reserved by Apple. lGParam1    Reserved by Apple. lGParam1    Reserved by Apple. fOurPtr    Reserved by Apple. fOurBits    Reserved by Apple. TGnlData   The TGnlData record is the basic record used by the PrGeneral procedure. Although no opcode of PrGeneral uses TGnlData, all other records that are used are based on this record.  TGnlData = RECORD                iOpCode: Integer;                iError: Integer;                lReserved: LongInt;                 {more fields here depending on call}                END;iOpCode    The opcode that is passed to PrGeneral to obtain the requested feature. There are five possible opcodes: GetRslDataOp, SetRslOp, GetRotnOp, DraftBitsOp, and NoDraftBitsOp. iError    The result code returned by PrGeneral.lReserved    Reserved by Apple. Additional fields may follow this field, depending on the opcode used. See the descriptions of the TGetRslBlk (page 1-35), TSetRslBlk (page 1-37), TDftBitsBlk (page 1-38), and TGetRotnBlk (page 1-38) records. TGetRslBlk   The TGetRslBlk data structure is the record that you pass to the PrGeneral procedure when you use the GetRslDataOp opcode. The PrGeneral procedure returns the record with the resolutions available on the current printing device. For information on how to use the GetRslDataOp opcode with the PrGeneral procedure, see “Determining the Resolution of the Current Printer” on page 1-17. If the printer uses discrete printing, the number of resolution values available on the printer is listed in the iRslRecCnt field and the records containing those values are in the rgRslRec array. If the printer supports variable printing, the resolution ranges in the X and Y directions are in the xRslRg and yRslRg fields. TGetRslBlk = RECORD                iOpCode: Integer;                            {The opcode passed to PrGeneral}                iError: Integer;                            {The result code returned by PrGeneral}                lReserved: LongInt;                            {Reserved by Apple}                iRgType: Integer;                            {The printer driver version number}                xRslRg: TRslRg;                            {The X-direction resolution range}                yRslRg: TRslRg;                            {The Y-direction resolution range}                iRslRecCnt: Integer;                            {The number of resolution records}                rgRslRec: ARRAY [1..27] OF TRslRec;                                             {The array of resolution records}                END;iOpCode    The opcode passed to the PrGeneral procedure to obtain the requested feature. In the case of the TGetRslBlk record, the opcode is GetRslDataOp. iError    The result code returned by PrGeneral.lReserved    Reserved by Apple. iRgType    The version number returned by the printer driver. The LaserWriter and ImageWriter printers always return 1. If this field is not 1, don’t use the data in this record.  xRslRg    The resolution range supported for the X direction. If the current printer does not support variable resolution, this value is 0. yRslRg    The resolution range supported for the Y direction. If the current printer does not support variable resolution, this value is 0. iRslRecCnt    The number of resolution records used by a particular printer driver, up to 27.rgRslRec    An array of resolution records, each specifying a discrete resolution at which the current printer can print an image. The xRslRg and yRslRg fields of the TGetRslBlk record are of type TRslRg. This data structure contains the minimum and maximum resolutions supported by the current printer driver. If the current printer does not support variable resolution, both fields of this subrecord are 0.TRslRg = RECORD                iMin: Integer;                        {The minimum resolution supported}                iMax: Integer;                        {The maximum resolution supported}                END;iMin    The minimum resolution supported by the current printer. If the printer supports only discrete resolutions, this value is 0.iMax    The maximum resolution supported by the current printer. If the printer supports only discrete resolutions, this value is 0.The rgRslRec field of the TGetRslBlk record are of type TRslRec. The TRslRec subrecord specifies a discrete resolution supported by the printer. A printer driver can have up to 27 separate TRslRec records. (The ImageWriter printer driver contains 4 such records.)TRslRec = RECORD                iXRsl: Integer;                        {Discrete resolution, X-direction}                iYRsl: Integer;                        {Discrete resolution, Y-direction}                END;iXRsl    The discrete resolution supported in the X direction. iYRsl    The discrete resolution supported in the Y direction. TSetRslBlk  The TSetRslBlk data structure is the record that you pass to the PrGeneral procedure when you use the SetRslOp opcode. It contains the resolutions that you want to use on the current printing device. For information on how to use the SetRslOp opcode with the PrGeneral procedure, see “Determining the Resolution of the Current Printer” on page 1-17. TSetRslBlk = RECORD                iOpCode: Integer;                            {The opcode passed to PrGeneral}                iError: Integer;                            {The result code returned by PrGeneral}                lReserved: LongInt;                            {Reserved by Apple}                hPrint: THPrint;                            {A handle to current print record}                iXRsl: Integer;                            {The X-direction resolution you want}                iYRsl: Integer;                            {The Y-direction resolution you want}                END;iOpCode    The opcode passed to PrGeneral to obtain the requested feature. In the case of the TSetRslBlk record, the opcode is SetRslOp. iError    The result code returned by PrGeneral.lReserved    Reserved by Apple. hPrint    A handle to the print record. Your application should have already created this print record and passed it through the PrintDefault procedure to make sure that all of the information in the handle is good. iXRsl    The resolution in the X direction that you want the printer to use when printing. iYRsl    The resolution in the Y direction that you want the printer to use when printing. If the iError field returns noErr, the Printing Manager updates the print record with this resolution, which the printer uses at print time. If the iError field returns noSuchRsl, the current printer doesn’t support the requested resolution and the printer driver does not change the setting. TDftBitsBlk  The TDftBitsBlk record is the data structure is the record that you pass to the PrGeneral procedure when you use the DraftBitsOp opcode. For information on how to use the DraftBitsOp opcode with the PrGeneral procedure, see “Choosing Draft-Quality Printing” on page 1-21. TDftBitsBlk = RECORD                iOpCode: Integer;                            {The opcode passed to PrGeneral}                iError: Integer;                            {The result code returned by PrGeneral}                lReserved: LongInt;                            {Reserved by Apple}                hPrint: THPrint;                            {A handle to current print record}                END;iOpCode    The opcode passed to the PrGeneral procedure to obtain the requested feature. In the case of the TDftBitsBlk record, the opcode is DraftBitsOp. iError    The result code returned by the PrGeneral procedure.lReserved    Reserved by Apple. hPrint    A handle to the print record. Your application should have already created this print record and passed it through the PrintDefault procedure to make sure that all of the information in the handle is good. TGetRotnBlk   The TGetRotnBlk record is the data structure is the record that you pass to the PrGeneral procedure when you use the GetRotnOp opcode. PrGeneral returns it with a Boolean variable that tells you whether the user has selected landscape orientation. For information on how to use the GetRotnOp opcode with the PrGeneral procedure, see “Determining Page Orientation” on page 1-20. TGetRotnBlk = RECORD                iOpCode: Integer;                            {The opcode passed to PrGeneral}                iError: Integer;                            {The result code returned by PrGeneral}                lReserved: LongInt;                            {Reserved by Apple}                hPrint: THPrint;                            {A handle to current print record}                fLandscape: Boolean;                            {If the user wants landscape printing}                bXtra: SignedByte;                            {Reserved by Apple}                END;iOpCode    The opcode passed to the PrGeneral procedure to obtain the requested feature. In the case of the TGetRotnBlk record, the opcode is GetRotnOp. iError    The result code returned by the PrGeneral procedure.lReserved    Reserved by Apple. hPrint    A handle to the print record. Your application should have already created this print record and passed it through the PrintDefault procedure to make sure that all of the information in the handle is good. fLandscape    A Boolean variable that determines whether the user has selected landscape orientation in the style dialog box. A value of TRUE indicates the user has selected landscape orientation.bXtra    Reserved by Apple. TPrDlg  The TPrDlg record contains the information needed to set up either the style or job dialog box. The PrStlInit and PrJobInit function return this record, set up for the style and job dialog boxes respectively. You can find information on how to customize a printing dialog box in “Altering the Style or Job Dialog Box” on page 1-23.  TPrDlg = RECORD                Dlg:                DialogRecord;                             {Ptr to the dialog box}                pFltrProc:                ModalFilterProcPtr;                            {The dialog event filter}                pItemProc:                PItemProcPtr;                            {The Item evaluating proc.}                hPrintUsr:                THPrint;                            {The print record}                fDoIt:                Boolean;                            {Dialog box confirmed}                fDone:                Boolean;                            {User’s interaction completed}                lUser1:                LongInt;                            {Storage for your application}                lUser2:                LongInt;                            {Storage for your application}                lUser3:                LongInt;                            {Storage for your application}                lUser4:                LongInt;                            {Storage for your application}                END;Dlg    A pointer to the dialog box, which may be either the style or job dialog box. pFltrProc    A pointer to the dialog event filter. pItemProc    A pointer to the routine that handles the items of the dialog box, also known as the dialog hook. hPrintUsr    The document’s print record.fDoIt    Whether the user has confirmed the dialog box. TRUE means the user has confirmed it by clicking “OK”.fDone    Whether the user’s interaction is completed. TRUE means the user has clicked either “OK” or “Cancel”. lUser1    In this field and the following fields, your application can store any kind of data you wish for the dialog box, such as global storage. lUser2    See lUser1.lUser3    See lUser1.lUser4    See lUser1.RoutinesThis section describes the routines you use to initialize the Printing Manager, print a document, produce or alter a style or job dialog box, and handle printing errors.The trap macro for all of the routines in the Printing Manager is  _PrGlue, and the trap is $A8FD. The routine selector for each individual routine is provided with the routine. Opening and Closing the Printing Manager You must always open the Printing Manager before attempting to print and close it when printing is finished. If you don’t, you risk crashing the user’s system.  1PrOpen  Use the PrOpen procedure to prepare the Printing Manager for use. PROCEDURE PrOpen;DESCRIPTIONYou must always use the PrOpen procedure before attempting to print anything. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrOpen procedure is $C8000000. Trap macro        Trap_PrGlue        $A8FD1PrClose  Use the PrClose procedure to close the Printing Manager and release the memory it used. PROCEDURE PrClose;DESCRIPTIONThe PrClose procedure is the call that balances a call to the PrOpen procedure.If you have opened the Printing Manager with the PrOpen procedure, do not call the PrDrvrClose procedure to close the Printing Manager.ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrClose procedure is $D0000000. Trap macro        Trap_PrGlue        $A8FDFilling and Verifying Print RecordsYou must fill the print record with the values for the current printer driver or, if a print record already exists, verify that the information in the print record is correct. If the print record is not valid for the current printer driver, the document will not print. The PrValidate function ensures that the print record is compatible with the current versions of the printer driver. The PrintDefault procedure fills in a print record with the default values for the currently selected printer. These functions may change the coordinates of the page rectangle or any other value in the print record; you should not assume any values will remain the same.1PrValidate  When you have a print record, whether an existing one from the current document or a new one you have just created, you can use the PrValidate function to check the contents of the specified print record for compatibility with the current version of the printer driver of the current printer. FUNCTION PrValidate (hPrint: THPrint): Boolean;hPrint    The handle to the specified print record, which may be a new record or an existing one from a document.DESCRIPTIONIf the print record is valid, PrValidate returns FALSE, meaning there is no change. If the record is invalid, the function returns TRUE and the Printing Manager adjusts the record with the default values stored in the printer resource file.PrValidate also makes sure that all the information in the print record is internally self-consistent and updates the print record as necessary. These changes do not affect the function’s Boolean result. If you have just created a print record, using the PrintDefault procedure, you do not need to call PrValidate. The PrintDefault procedure does this automatically. You should never call PrValidate between the pages of a document. This restriction holds as well for the PrStlDialog and PrJobDialog functions and the PrintDefault procedure, which call PrValidate.<36pt\>\x12 <8bat\>sASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrValidate function is $52040498. Trap macro        Trap_PrGlue        $A8FD1PrintDefault  When you create a print record, you use the PrintDefault procedure to fill the fields of the specified print record with default values for resolution, number of copies, and other information in the print record and its subrecords. PROCEDURE PrintDefault (hPrint: THPrint);hPrint    The handle to the specified print record, which may be a new record or an existing one from a document.DESCRIPTIONThe default values for the current printer are stored in the printer resource file. PrintDefault puts these values in the print record, erasing the ones that may already be there (if the print record already existed). PrintDefault calls PrValidate to check the print record for compatibility with the current version of the printer driver. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrintDefault procedure is $20040480. Trap macro        Trap_PrGlue        $A8FDSEE ALSOThe print record is discussed in “The Print Record and the Printing Loop” on page 1-7. Displaying and Customizing the Printing Dialog BoxesThe style and job dialog boxes allow the user to tell your application how to print the document: page orientation, number of copies, page range to print, and so on. You can use the dialog boxes provided by the Printing Manager, or you can customize the standard dialog boxes. You can copy the results of one job dialog box to several documents when the user wants to print several documents at once.The PrStlDialog and PrJobDialog functions display the standard style and job dialog boxes. The PrDlgMain function, using the PrStlInit and PrJobInit functions, allows you to customize the standard style and job dialog boxes for your application. The PrJobMerge procedure allows you to use one job dialog box for several print jobs, such as when the user prints several documents from the Finder. 1PrStlDialog   Call the PrStlDialog function displays a style dialog box, which the user can use to specify the page dimensions and other information needed for a page setup. FUNCTION PrStlDialog (hPrint: THPrint): Boolean;hPrint    The handle to the specified print record, which may be a new record or an existing one from a document.DESCRIPTIONThe Printing Manager takes the initial settings displayed in the style dialog box  from the print record. If the user confirms the dialog box, the PrStlDialog function returns TRUE, and the Printing Manager saves the results of the dialog box in the specified print record and calls the PrValidate function. Otherwise, the print record is left unchanged and the function returns FALSE. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrStlDialog function is $2A040484. Trap macro        Trap_PrGlue        $A8FD1PrJobDialog  You can call the PrJobDialog function to produce a job dialog box, which the user can use to determine the print quality, the range of pages to print, and so on. FUNCTION PrJobDialog(hPrint: THPrint): Boolean;hPrint    The handle to the specified print record, which may be a new record or an existing one from a document.DESCRIPTIONThe printer driver shows the default settings for the current printer in the job dialog box. If the user confirms the dialog box, the Printing Manager updates both the print record and the printer resource file and calls the PrValidate function, and the PrJobDialog function returns TRUE. Otherwise, the print record and the printer resource file are left unchanged and the function returns FALSE. If the PrJobDialog function returns TRUE, you should proceed with the requested printing operation. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrJobDialog function is $32040488. Trap macro        Trap_PrGlue        $A8FD1PrDlgMain      Use the PrDlgMain function to display a style or job dialog box after you have customized it. FUNCTION PrDlgMain (hPrint: THPrint; pDlgInit: PDlgInitProcPtr):                                         Boolean;hPrint    The handle to the specified print record, which may be a new record or an existing one from a document.pDlgInit    A pointer to an initialization procedure for one of the two Printing Manager printing dialog boxes, or to your own initialization procedure. DESCRIPTIONYou can use the PrDlgMain function to set up a printing dialog box, or you can initalize the style or job dialog box yourself and then send PrDlgMain your initialization function. The printing dialog boxes initialization functions, PrStlInit and PrJobInit, set up the dialog box in a TPrDlg record (described on page 1-39), which contains pointers for the dialog event filter and the procedure for evaluating the items of the dialog box, including your own. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrDlgMain function is $4A040894. Trap macro        Trap_PrGlue        $A8FDSEE ALSOFor more information about customizing style or job dialog boxes, see “Altering the Style or Job Dialog Box” on page 1-23.1PrStlInit  The PrStlInit function returns a pointer to the style dialog box (described on page 1-7) in memory but does not display the dialog box.FUNCTION PrStlInit (hPrint: THPrint): TPPrDlg;hPrint    The handle to the specified print record, which may be a new record or an existing one from a document.DESCRIPTIONYou pass the address of the PrStlInit function in the pDlgInit parameter of the PrDlgMain function, which is described on page 1-44. The PrStlInit function returns a pointer to a printing style dialog box.ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrStlInit function is $3C04040C. Trap macro        Trap_PrGlue        $A8FDSEE ALSOFor more information about customizing style or job dialog boxes, see “Altering the Style or Job Dialog Box” on page 1-23.1PrJobInit  The PrJobInit function returns a pointer to the job dialog box (described on page 1-7) in memory but does not display the dialog box. FUNCTION PrJobInit (hPrint: THPrint): TPPrDlg;hPrint    The handle to the specified print record, which may be a new record or an existing one from a document.DESCRIPTIONYou pass the address of the PrJobInit function in the pDlgInit parameter of the PrDlgMain function, which is described on page 1-44. The PrJobInit function returns a pointer to a printing job dialog box.ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrJobInit function is $44040410. Trap macro        Trap_PrGlue        $A8FDSEE ALSOFor more information about customizing style or job dialog boxes, see “Altering the Style or Job Dialog Box” on page 1-23.1PrJobMerge  You can use the PrJobMerge procedure to display a job dialog box just once and then copy the job information to several print records, which means that you can print several documents with one dialog box. This is useful when the user prints from the Finder. PROCEDURE PrJobMerge (hPrintSrc: THPrint;hPrintDst: THPrint); hPrintSrc    The print record from the Finder.hPrintDst    The print record from the document. DESCRIPTIONThe PrJobMerge procedure first calls the PrValidate function for each of the  print records named by the hPrintSrc and hPrintDst parameters. It then copies all of the information set as a result of a job dialog box from the hPrintSrc parameter to the hPrintDst parameter while preserving the values set by the style dialog box for that print record (for instance, landscape orientation). Finally, the PrJobMerge procedure makes sure that all the fields of the print record named by the hPrintDst parameter are internally self-consistent. You must call PrJobMerge for each document the user wants to print; however, it can only make one copy of each document. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrJobMerge procedure is $5804089C. Trap macro        Trap_PrGlue        $A8FDPrintingIn addition to opening and closing the Printing Manager, you must open and close the document being printed and each page of the document before you can print it. The PrOpenDoc function and PrCloseDoc procedures open and close the document, and the PrOpenPage and PrClosePage procedures open and close the current page.You must use the PrPicFile procedure to complete a deferred printing. There is no special Printing Manager routine for immediate printing; the routines you use to draw the document in the printing grafPort print the document immediately. 1PrOpenDoc   Use the PrOpenDoc function to initialize a printing grafPort for use in printing a document, make it the current port, and return a pointer to it.FUNCTION PrOpenDoc (hPrint: THPrint; pPrPort: TPPrPort; pIOBuf:                                         Ptr): TPPrPort;hPrint    The handle to a print record, which may be a new record or an existing one from a document.pPrPort    A pointer to the printing grafPort. This parameter should be NIL, which means that PrOpenDoc allocates a new printing grafPort in the heap. pIOBuf    A pointer to an area of memory to be used as an input/output buffer. This parameter should be NIL, which means that PrOpenDoc uses the volume buffer for the spool file’s volume. If you allocate your own buffer, it must be 522 bytes exactly. DESCRIPTIONDepending on the setting of the bJDocLoop field in the printing job subrecord, the Printing Manager sets up the printing grafPort for immediate or deferred printing. For deferred printing, it takes the spool file’s name, volume reference number, and version number from the printing job subrecord. Because both the printing grafPort and input/output buffer are nonrelocatable objects, you may want to allocate them yourself using the pPrPort and pIOBuf parameters, to avoid fragmenting the heap. You must balance a call to PrOpenDoc with a call to PrCloseDoc.ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrOpenDoc function is $04000C00. Trap macro        Trap_PrGlue        $A8FDSEE ALSOFor an example of a printing loop, see Listing 1-1 beginning on page 1-12. 1PrCloseDoc  Use the PrCloseDoc procedure to close the printing grafPort data type. PROCEDURE PrCloseDoc (pPrPort: TPPrPort);pPrPort    A pointer to the printing grafPort data type. DESCRIPTIONFor immediate printing, the PrCloseDoc procedure ends the printing job.For deferred printing, PrCloseDoc ends the deferment: the document must now be printed. Before printing the document, call the PrError procedure to find out whether spooling succeeded. If it did, unload unused code segments  to ensure that you have as much memory as possible in which to print and then call PrPicFile. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrCloseDoc procedure is $08000484. Trap macro        Trap_PrGlue        $A8FDSEE ALSOFor an example of a printing loop, see Listing 1-1 beginning on page 1-12. 1PrOpenPage  Use the PrOpenPage procedure to begin a new page. PROCEDURE PrOpenPage (pPrPort: TPPrPort; pPageFrame: TPRect);pPrPort    A pointer to the printing grafPort. pPageFrame    For deferred printing, a pointer to a rectangle to be used as the QuickDraw picture frame for this page. DESCRIPTIONThe page is printed only if it falls within the page range given in the printing job subrecord. If the user has chosen deferred printing, the Printing Manager scales the rectangle named by the pPageFrame parameter (with the QuickDraw procedure DrawPicture) to coincide with the rectangle specified by rPage in the printer information subrecord. Unless you want the printout to be scaled, you should set pPageFrame to NIL—this uses the rPage rectangle as the picture frame, so that the page is printed with no scaling.You must balance every call to PrOpenPage with a call to PrClosePage. SPECIAL CONSIDERATIONSThe printing grafPort is completely reinitialized by PrOpenPage. Therefore, you must set grafPort features such as the font family and font size for every page that you draw after you call this procedure.Don’t call the QuickDraw function OpenPicture while a page is open (after a call to PrOpenPage but before calling PrClosePage). You can, however, call DrawPicture at any time.ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrOpenPage procedure is $10000808. Trap macro        Trap_PrGlue        $A8FDSEE ALSOFor an example of a printing loop, see Listing 1-1 beginning on page 1-12. 1PrClosePage  Use the PrClosePage procedure to finish the printing of the current page. PROCEDURE PrClosePage (pPrPort: TPPrPort);pPrPort    A pointer to the printing grafPort. DESCRIPTIONPrClosePage tells the Printing Manager that you are finished with this page, so that the printer driver can do whatever is required (such as release temporary memory) for the current printer in order to avoid communication difficulties or other problems that may cause the user’s computer to crash. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrClosePage procedure is $1800040C. Trap macro        Trap_PrGlue        $A8FDSEE ALSOFor an example of a printing loop, see Listing 1-1 beginning on page 1-12. 1PrPicFile   Use the PrPicFile procedure to complete deferred printing. PROCEDURE PrPicFil (hPrint: THPrint; pPrPort: TPPrPort; pIOBuf:                                         Ptr; pDevBuf: Ptr; VAR prStatus: TPrStatus);hPrint    The handle to the specified print record, which may be a new record or an existing one from a document.pPrPort    A pointer to the printing grafPort. This parameter should be NIL, which means that PrPicFile should allocate a new printing grafPort in the heap. pIOBuf    A pointer to an area of memory to be used as an input/output buffer. This parameter should be NIL, which means that PrPicFile should use the volume buffer for the spool file’s volume. If you allocate your own buffer, it must be 522 bytes exactly. pDevBuf    A pointer to a device-dependent buffer. This parameter should be NIL, which means that PrPicFile should allocate a buffer in the heap. prStatus    A printing status record that PrPicFile uses to report on its progress: current page number, current copy, or current file being spooled. You can then display this information to the user. The TPrStatus data type is described on page 1-33. DESCRIPTIONIf the user has chosen deferred printing (for example, to get high-quality output on the ImageWriter printer), your application should normally call PrPicFile after PrCloseDoc.SPECIAL CONSIDERATIONSBe sure not to pass, in the pPrPort parameter, a pointer to the same printing grafPort you received from PrOpenDoc. If that port was allocated by PrOpenDoc itself (that is, if the pPrPort parameter to PrOpenDoc was NIL), then PrCloseDoc will have disposed of the port, making your pointer to it invalid. Of course, if you earlier provided your own storage in PrOpenDoc, there’s no reason you can’t use the same storage again for PrPicFile.ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrPicFile procedure is $60051480. Trap macro        Trap_PrGlue        $A8FDOptimizing PrintingThe PrGeneral procedure is a multipurpose routine that allows your application to achieve the highest resolution print output on the current printer, verify page orientation, and increase performance by avoiding deferred printing. In order to select which action you want, you pass an opcode in the iOpcode field of the pData parameter of the procedure. The pData parameter can point to one of four records:  TGetRslBlk (page 1-35), TSetRslBlk (page 1-37), TGetRotnBlk (page 1-38), and TDftBitsBlk (page 1-38). All of these records are based on the TGnlData record (page 1-35), so the first three fields of each are identical.     Before using the PrGeneral procedure, you should determine whether the current printer driver supports it. See “Checking for PrGeneral” on page 1-16.ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrGeneral procedure is $70070480. Trap macro        Trap_PrGlue        $A8FD1PrGeneral With the GetRslDataOp Opcode      Use the PrGeneral procedure with the value GetRslDataOp for the iOpcode field of the parameter block when you want to determine the resolutions available to the current printer. PROCEDURE PrGeneral (pData: Ptr);pData    A pointer to the TGetRslBlk record (page 1-35). DESCRIPTIONAfter you call to the PrGeneral procedure with the GetRslDataOp opcode, you should check the value in the iError field of the TGetRslBlk record. The possible result codes are listed below. You should also call PrError (which returns the result code left by the last Printing Manager routine) after checking the iError field, to be sure that no additional errors were generated. RESULT CODESnoErr    0    No errorOpNotImpl    2    Printer driver does not support this opcodeSEE ALSOSee Listing 1-4 on page 1-19 for an example of how to use the GetRslDataOp opcode to determine what printer resolutions are available for the current printer.1PrGeneral With the SetRslOp Opcode   Use the PrGeneral procedure with the value SetRslOp for the iOpcode field of the parameter block  when you want to set the resolution the current printer. PROCEDURE PrGeneral (pData: Ptr);pData    A pointer to the TSetRslBlk record (page 1-37). DESCRIPTIONAfter you call the PrGeneral procedure with the SetRslOp opcode, you should check the value in the iError field of the TSetRslBlk record. The possible result codes are listed below. You should also call PrError (which returns the result code left by the last Printing Manager routine) after checking the iError field, to be sure that no additional errors were generated. RESULT CODESnoErr    0    No errorNoSuchRsl    1    Requested resolution not supported by the         currently selected printerOpNotImpl    2    Printer driver does not support this opcodeSEE ALSOSee Listing 1-4 on page 1-19 for an example of how to use the SetRslOp opcode to set the resolution for the current printer.1PrGeneral With the GetRotnOp Opcode    Use the PrGeneral procedure with the value GetRotnOp for the iOpcode field of the parameter block  when you want to determine if the user has chosen landscape orientation in the style dialog box. PROCEDURE PrGeneral (pData: Ptr);pData    A pointer to a TGetRotnBlk record (page 1-38). DESCRIPTIONAfter you call the PrGeneral procedure with the GetRotnOp opcode, you should check the value in the iError field of the TGetRotnBlk record. The possible result codes are listed below. You should also call PrError (which returns the result code left by the last Printing Manager routine) after checking the iError field, to be sure that no additional errors were generated. RESULT CODESnoErr    0    No errorOpNotImpl    2    Printer driver does not support this opcodeSEE ALSOSee Listing 1-5 on page 1-21 for an example of using the GetRotnOp opcode to determine if the user has selected landscape orientation.1PrGeneral With the DraftBitsOp and NoDraftBitsOp Opcodes     Use the PrGeneral procedure with the value DraftBitsOp for the iOpcode field of the parameter block when you want to force draft-quality printing. The NoDraftBitsOp opcode cancels the use of draft-quality printing. PROCEDURE PrGeneral (pData: Ptr);pData    A pointer to a TDftBitsBlk record (page 1-38). DESCRIPTIONAfter you call the PrGeneral procedure with the DraftBitsOp opcode, you should check the value in the iError field of the TDftBitsBlk record. The possible result codes are listed below. You should also call PrError (which returns the result code left by the last Printing Manager routine) after checking the iError field, to be sure that no additional errors were generated. RESULT CODESnoErr    0    No errorOpNotImpl    2    Printer driver does not support this opcodeSEE ALSOSee “Choosing Draft-Quality Printing” on page 1-21 for more information on using  the DraftBitsOp and NoDraftBitsOp opcodes to force the use of or to cancel the use of draft-quality printing.Error HandlingThe PrError function returns the result code left by the last Printing Manager routine. The PrSetError procedure lets you set the value of the current Printing Manager error. 1PrError  You can get the result code returned by the last Printing Manager routine from the PrError function. FUNCTION PrError: Integer;DESCRIPTIONIf an error that does not belong to the Printing Manager occurs, the Printing Manager puts it into low memory, where it can be retrieved with a call to PrError, and then terminates the printing loop, if necessary.  If you encounter an error in the middle of a printing loop, do not end printing abruptly; call the close routines for any open routines you have already made and let the Printing Manager terminate properly. The Printing Manager returns the following general errors: Name        Result Code        DescriptioniPrAbort        128    Application or user            requested cancelnoErr        0    No erroriPrSavPFil        –1    Saving print filecontrolErr        –17    Unimplemented control            instructionsiIOAbort        –27    I/O erroriMemFullErr        –108    Not enough room in the            heap zoneresNotFound        –192    The printer does not support            the PrGeneral procedureThe Device Manager returns the controlErr result code. The following result codes are specific to the LaserWriter printer family:Result Code    Description–8133    PostScript error occurred during transmission of data to printer.  Most      often caused by a bug in the PostScript code being downloaded.–8132    Timeout occurred (no communication has occurred with the printer for     2 minutes.  Usually caused by extremely long imaging time.–8131    Printer not responding; it may have been turned off.  This error occurs     if a user turns off the LaserWriter printer in the middle of a print job.–4101    Printer not found or closed.–4100    Connection closed.–4099    Write request too big.–4098    Request already active.–4097    Bad connection refnum.–4096    No free Connect Control Blocks (CCBs) availableIf PrError returns resNotFound after you call the PrGeneral procedure, the current printer driver does not support the PrGeneral procedure. You should clear this error with a call to the PrSetError procedure, with a parameter of 0; otherwise, PrError might still contain this error next time you check it.  The following errors are specific to thePrGeneral procedure:Name        Result Code        DescriptionNoSuchRsl        1    Requested resolution is not             supportedOpNotImpl        2    Requested PrGeneral             opcode not implemented in             the current printer driver.resNotfound        –192    The current printer driver             does not support PrGeneral.The most common error encountered is –4101, which is generated if no LaserWriter printer is selected.  Since this error is so common, it is a good idea to display a dialog box requesting the user to select a printer from the Chooser when this error is encountered.ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrError function is $BA000000. Trap macro        Selector_PrGlue        $A8FDSEE ALSOSee the section “Handling Printing Errors” on page 1-28 for more information on using PrError. 1PrSetError   You can use the PrSetError procedure to set the value of the current printing result code.PROCEDURE PrSetError(iErr: Integer);iErr    The value of the result code.DESCRIPTIONPrSetError stores the specified value into the global variable PrintErr where the Printing Manager keeps its result code. You can use PrSetError to cancel a printing operation.If PrError <> noErr THEN PrSetError(iPrAbort)ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrSetError function is $C0000200. Trap macro        Trap_PrGlue        $A8FDLow-Level RoutinesIn general, you should use the high-level routines of the Printing Manager in preference to the low-level routines. Low-level calls are not guaranteed to work in future versions of the system software in precisely the same manner as they have in past versions of the software. Low-level routines are primarily suited for functions such as text streaming (the process of receiving data from a source and printing it immediately, without any intermediate formatting). In addition, if you use the low-level routines and the user prints a document on a LaserWriter printer, the LaserWriter printer driver translates all low-level calls to the matching high-level ones, so your application does not gain a speed advantage. You should not use both the high-level and low-level routines at the same time (that is, when one or the other interface has opened the printer driver). The only exception to this is that you may use the PrDrvrVers function (page 1-58) with the high-level routines.<36pt\>\x12 <8bat\>s1PrDrvrOpen   The PrDrvrOpen procedure opens the printer driver, reading it into memory if necessary.   PROCEDURE PrDrvrOpen;DESCRIPTIONUse the PrDrvrOpen procedure with the PrDrvrClose procedure. Do not mix the open and close routines for the low-level interface with the routines from the high-level interface. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrDrvrOpen procedure is $80000000. Trap macro        Trap_PrGlue        $A8FD1PrDrvrClose   The PrDrvrClose procedure closes the printer driver, releasing the memory it occupies. PROCEDURE PrDrvrClose;ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrDrvrClose procedure is $88000000. Trap macro        Trap_PrGlue        $A8FD1PrDrvrDCE   PrDrvrDCE returns a handle to the printer driver’s device control entry (DCE). FUNCTION PrDrvrDCE: Handle;DESCRIPTIONThe printer driver’s device control entry contains specific information about that printer driver. You can also get a handle to the driver’s DCE by calling the Device Manager function GetDCtlEntry. For more information about device control entries and how the Device Manager uses them, see the chapter “Device Manager” in the Inside Macintosh: <italics\>Devices. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrDrvrDCE function is $94000000. Trap macro        Trap_PrGlue        $A8FD1PrDrvrVers   PrDrvrVers returns the version number of the printer driver in the system resource file.   FUNCTION PrDrvrVers: Integer;DESCRIPTIONThe version number of the printer driver is available as the predefined constant iPrRelease. You may want to compare the result of PrDrvrVers with iPrRelease to see if the printer driver in the resource file is the most recent version.  This is the only low-level printing function you may call from the high-level interface. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrDrvrVers function is $9A000000. Trap macro        Trap_PrGlue        $A8FDLow-Level Control CallsThe PrCtlCall procedure calls the printer driver’s control routine. Instead of sending the low-level calls to the device driver, the PrCtlCall procedure converts the call into its high-level equivalent before execution. ASSEMBLY LANGUAGE INFORMATIONThe routine selector for the PrCtlCall procedure is $A0000E00. Trap macro        Trap_PrGlue        $A8FD1PrCtlCall With the iPrBitsCtl Control Constant   You can use the PrCtlCall procedure with the iPrBitsCtl control constant when you want to print bitmaps. PROCEDURE PrCtlCall (iWhichCtl: Integer; lParam1: LongInt;                                         lParam2: LongInt; lParam3: LongInt);iWhichCtl    The constant iPrBitsCtl. This constant allows you to send all or part of a QuickDraw bitmap directly to the printer.lParam1    A pointer to the QuickDraw bitmap.lParam2    A pointer to the rectangle you want to print.lParam3    The type of resolution used to print the bitmap. The LaserWriter printer driver ignores this flag. This parameter can have one of the following values:Constant        Value    DescriptionlScreenBits        $00000000    The resolution is 80 ¥ 72.lPaintBits        $00000001    The resolution is 72 ¥ 72.lHiScreenBits        $00000002    The resolution is 160 ¥ 144.lHiPaintBits        $00000003    The resolution is 144 ¥ 144.1PrCtlCall With the iPrIOCtl Control Constant   You can use the PrCtlCall procedure with the iPrIOCtl control constant when you want text streaming in your application. Text streaming is useful for fast printing of text when speed is more important than visual fidelity or formatting. It makes no use of QuickDraw. PROCEDURE PrCtlCall (iWhichCtl: Integer; lParam1: LongInt;                                         lParam2: LongInt; lParam3: LongInt);iWhichCtl    The constant iPrIOCtl. This constant causes text streaming to occur.  lParam1    A pointer to the beginning of the text. lParam2    The number of bytes to transfer. The high-order word must be 0. lParam3    This should be 0. 1PrCtlCall With the iPrEvtCtl Control Constant  You can use the PrCtlCall procedure with the iPrEvtCtl control constant for printing the screen or the topmost window on an ImageWriter printer. The LaserWriter printer driver does not support this call. PROCEDURE PrCtlCall (iWhichCtl: Integer; lParam1: LongInt;                                         lParam2: LongInt; lParam3: LongInt);iWhichCtl    The constant iPrEvtCtl. This constant prints the object you have selected using the lParam1 parameter.  lParam1    This parameter selects the object to be printed. If this value is $00000000, you want to print the screen. If this value is $00010000, you want to print the topmost window. lParam2    This should be NIL. lParam3    This should be NIL. 1PrCtlCall with the iPrDevCtl Control Constant  You can use the PrCtlCall procedure with the iPrDevCtl control constant for controlling the printer device.PROCEDURE PrCtlCall(iWhichCtl: Integer;lParam1: LongInt;lParam2: LongInt; lParam3: LongInt);iWhichCtl    The constant iPrDevCtl. lParam1    The action you want to take.  The values possible for this parameter are listed below. lParam2    This should be NIL. lParam3    This should be NIL. DESCRIPTIONYou can specify the following values for the lParam1 parameter:Constant    Value    DescriptionlPrDocOpen    $00010000    Opens the document.This is similar to the high-level call         PrOpenDoc and should be followed with a call to PrCtlCall         with the iPrDevCtl control call and a param1 value of         lPrDocClose. lPrReset    $00010000    Reserved by Apple.lPrPageClose    $00020000    Closes the page. This is similar to the high-level call         PrClosePage and should follow a call to PrCtlCall         with the iPrDevCtl control call and a param1 value of         lPrPageOpen. lPrPageEnd    $00020000    Reserved by Apple. lPrLineFeed    $00030000    Paper advance.  lPrLFStd    $0003FFFF    Carriage return with line feed. The ImageWriter printer driver         causes a carriage return plus a paper feed of 1/6th of an inch.         The LaserWriter printer driver moves the pen location down         the page. lPrPageOpen    $00040000    Opens the page for printing. This is similar to the high-level call         PrOpenPage and should be followed with a call to PrCtlCall         with the iPrDevCtl control call and a param1 value of         lPrPageClose. lPrDocClose    $00050000    Closes the document. This is similar to the high-level call         PrCloseDoc and should follow a call to PrCtlCall with the         iPrDevCtl control call and a param1 value of lPrDocOpen. SummaryConstantsCONST    iPFMaxPgs = 128;    iPrPgFract = 120;                 {Page scale factor. ptPgSize (below) is in units of 1/iPrPgFract}    iPrPgFst = 1;                                 {Page range constants}    iPrPgMax = 9999;    iPrRelease = 3;                                 {Current version number of the code.}    iPrSavPFil = -1;    iPrAbort = $0080;    iPrDevCtl = 7;                                 {The PrDevCtl proc's ctl number}    lPrReset = $00010000;                                {The PrDevCtl proc's CParam for reset}    lPrLineFeed = $00030000;    lPrLFStd = $0003FFFF;                                {The PrDevCtl proc's CParam for std paper advance}    lPrLFSixth = $0003FFFF;    lPrPageEnd = $00020000;                                {The PrDevCtl proc's CParam for end page}    lPrDocOpen = $00010000;    lPrPageOpen = $00040000;    lPrPageClose = $00020000;    lPrDocClose = $00050000;    iFMgrCtl = 8;                                 {The File Mgr's tail-hook Proc's ctl number}    iMemFullErr = -108;    iIOAbort = -27;    pPrGlobals = $00000944;                                {The PrVars low memory area}    bDraftLoop = 0;    bSpoolLoop = 1;    bUser1Loop = 2;    bUser2Loop = 3;    iPrBitsCtl = 4;    lScreenBits = 0;    lPaintBits = 1;    lHiScreenBits = $00000002;                                    {The Bitmap Print proc's Screen Bitmap param}    lHiPaintBits = $00000003;                                     {The Bitmap Print proc's Paint [sq pix] param}    iPrIOCtl = 5;    iPrEvtCtl = 6;                                    {The PrEvent proc's ctl number}    lPrEvtAll = $0002FFFD;         {The PrEvent Proc's CParam for the entire screen}    lPrEvtTop = $0001FFFD;         {The PrEvent Proc's CParam for the top folder}    iPrDrvrRef = -3;    getRslDataOp = 4;    setRslOp = 5;    draftBitsOp = 6;    noDraftBitsOp = 7;    getRotnOp = 8;    NoSuchRsl = 1;    RgType1 = 1;Data TypesTYPE TFeed = (feedCut,feedFanfold,feedMechCut,feedOther);    TScan = (scanTB,scanBT,scanLR,scanRL);    TPRect = ^Rect;             { A Rect Ptr }    PrIdleProcPtr = ProcPtr;    PItemProcPtr = ProcPtr;    TPPrPort = ^TPrPort;    TPrPort = RECORD        gPort:                 GrafPort;                {The Printer's graf port.}        gProcs:                 QDProcs;                {..and its procs}        lGParam1:                LongInt;            {16 bytes for private parameter storage.}        lGParam2:                LongInt;        lGParam3:                LongInt;        lGParam4:                LongInt;        fOurPtr:                Boolean;            {Whether the PrPort allocation was done by us.}        fOurBits:                Boolean;            {Whether the BitMap allocation was done by us.}        END;    TPPrInfo = ^TPrInfo;    TPrInfo = RECORD        iDev:            Integer;        {Font Mgr/QuickDraw device code}        iVRes:            Integer;            {Resolution of device, in device coordinates}        iHRes:            Integer;            {..note: V before H => compatable with Point.}        rPage:            Rect;            {The page (printable) rectangle in device coordinates.}    END;    TPPrStl = ^TPrStl;    TPrStl = RECORD        wDev:            Integer;        iPageV:            Integer;        iPageH:            Integer;        bPort:            SignedByte;        feed:            TFeed;    END;TPPrJob = ^TPrJob;TPrJob = RECORD    iFstPage:                Integer;      {Page range}    iLstPage:                Integer;    iCopies:                Integer;       {Number of copies.}    bJDocLoop:                SignedByte;    {The printing method: immediate or spooled}    fFromUsr:                Boolean;    {Printing from an user's app (not PrApp) flag}    pIdleProc:                PrIdleProcPtr;    {The proc called while application sends document to printer}    pFileName:                StringPtr;             {Spool filename: NIL for default.}    iFileVol:                Integer;      {Spool file vol, set to 0 initially}    bFileVers:                SignedByte;    {Spool file version, set to 0 initially}    bJobX:                SignedByte;      {An extra byte.}    END;TPPrint = ^TPrint;THPrint = ^TPPrint;TPrint = RECORD    iPrVersion:                Integer;            {(2) Printing software version}    prInfo:                TPrInfo;            {the printer information subrecord}    rPaper:                Rect;            {the paper rectangle [offset from rPage]}    prStl:                TPrStl;            {information from the style dialog box}    prInfoPT:                TPrInfo;      {(14)  Print Time Imaging metrics}    prXInfo:                TPrXInfo;{Reserved}    prJob:                TPrJob;            {information from the job dialog box}    printX:                ARRAY [1..19] OF Integer; {Reserved}    END;{ The universal 120 byte printing record }TPPrStatus = ^TPrStatus;TPrStatus = RECORD    iTotPages:                Integer;    {Total pages in Print File.}    iCurPage:                Integer;         {Current page number}    iTotCopies:                Integer;    {Total copies requested}    iCurCopy:                Integer;    {Current copy number}    iTotBands:                Integer;    {Total bands per page.}    iCurBand:                Integer;    {Current band number}    fPgDirty:                Boolean;    {True if current page has been written to.}    fImaging:                Boolean;    {Set while in band's DrawPic call.}    hPrint:                THPrint;    {Handle to the active Printer record}    pPrPort:                TPPrPort;    {Ptr to the active PrPort}    hPic:                PicHandle;    {Handle to the active Picture}    END;{ PicFile = a TPfHeader followed by n QuickDraw Pics (whose PicSize is invalid!) }TPPrDlg = ^TPrDlg;TPrDlg = RECORD    Dlg:                DialogRecord;                             {Ptr to the dialog box}    pFltrProc:                ModalFilterProcPtr;                            {The dialog event filter}    pItemProc:                PItemProcPtr;                            {The Item evaluating proc.}    hPrintUsr:                THPrint;                            {The print record}    fDoIt:                Boolean;                            {Dialog box confirmed}    fDone:                Boolean;                            {User’s interaction completed}    lUser1:                LongInt;                            {Storage for your application}    lUser2:                LongInt;                            {Storage for your application}    lUser3:                LongInt;                            {Storage for your application}    lUser4:                LongInt;                            {Storage for your application}    END;PDlgInitProcPtr = ProcPtr;TGnlData = RECORD    iOpCode:                Integer;    iError:                Integer;    lReserved:                LongInt;     {more fields here depending on call}    END;TGetRslBlk = RECORD    iOpCode:                Integer;    iError:                Integer;    lReserved:                LongInt;    iRgType:                Integer;    xRslRg:                TRslRg;    yRslRg:                TRslRg;    iRslRecCnt:                Integer;    rgRslRec:                ARRAY [1..27] OF TRslRec;    END;TRslRg = RECORD    iMin:    Integer;    iMax:    Integer;    END;TRslRec = RECORD    iXRsl:    Integer;    iYRsl:    Integer;    END;TSetRslBlk = RECORD    iOpCode:                Integer;    iError:                Integer;    lReserved:                LongInt;    hPrint:                THPrint;    iXRsl:                Integer;    iYRsl:                Integer;    END;TDftBitsBlk = RECORD    iOpCode:                Integer;    iError:                Integer;    lReserved:                LongInt;    hPrint:                THPrint;    END;TGetRotnBlk = RECORD    iOpCode:                Integer;    iError:                Integer;    lReserved:                LongInt;    hPrint:                THPrint;    fLandscape:                Boolean;    bXtra:                SignedByte;    END;RoutinesOpening and Closing the Printing ManagerPROCEDURE PrOpen;PROCEDURE PrClose;Filling and Verifying Print Records PROCEDURE PrintDefault    (hPrint: THPrint);FUNCTION PrValidate    (hPrint: THPrint): Boolean;Displaying and Customizing the Printing Dialog Boxes FUNCTION PrStlDialog    (hPrint: THPrint): Boolean;FUNCTION PrJobDialog    (hPrint: THPrint): Boolean;FUNCTION PrDlgMain    (hPrint: THPrint; pDlgInit: PDlgInitProcPtr): Boolean;FUNCTION PrStlInit    (hPrint: THPrint): TPPrDlg;FUNCTION PrJobInit    (hPrint: THPrint): TPPrDlg;PROCEDURE PrJobMerge    (hPrintSrc: THPrint; hPrintDst: THPrint);PrintingFUNCTION PrOpenDoc    (hPrint: THPrint; pPrPort: TPPrPort; pIOBuf: Ptr): TPPrPort;PROCEDURE PrCloseDoc    (pPrPort: TPPrPort);PROCEDURE PrOpenPage    (pPrPort: TPPrPort; pPageFrame: TPRect);PROCEDURE PrClosePage    (pPrPort: TPPrPort);PROCEDURE PrPicFile    (hPrint: THPrint;pPrPort: TPPrPort; pIOBuf: Ptr; pDevBuf: Ptr; VAR prStatus: TPrStatus);Optimizing PrintingPROCEDURE PrGeneral    (pData: Ptr);Error HandlingFUNCTION PrError: INTEGER;PROCEDURE PrSetError    (iErr: INTEGER);Low-Level RoutinesPROCEDURE PrDrvrOpen;PROCEDURE PrDrvrClose;FUNCTION PrDrvrDCE: Handle;FUNCTION PrDrvrVers: INTEGER;Low-Level Control CallsPROCEDURE PrCtlCall    (iWhichCtl: INTEGER;lParam1: LONGINT;lParam2: LONGINT; lParam3: LONGINT);Assembly-Language InformationTrap Macros Requiring Routine Selectors_PrGlueSelector    Routine$C8000000    PrOpen$D0000000    PrClose$20040480    PrintDefault$52040498    PrValidate$2A040484    PrStlDialog$32040488    PrJobDialog$4A040894    PrDlgMain$3C04040C    PrStlInit$44040410    PrJobInit$5804089C    PrJobMerge$04000C00    PrOpenDoc$08000484    PrCloseDoc$10000808    PrOpenPage$1800040C    PrClosePage$60051480    PrPicFile$BA000000    PrError$C0000200    PrSetError$70070480    PrGeneral$94000000    PrDrvrDCE$9A000000    PrDrvrVers$80000000    PrDrvrOpen$88000000    PrDrvrClose$A0000E00    PrCtlCallIndexBbackground procedurewriting25 to 26Ddeferred printing4dialog event filtersPrinting Manager23discrete resolution5dots per inch5draft printing, See immediate printingdraft-quality printing4Hhigh-quality printing4Iidle procedure9definition8 to 9immediate printingJjob dialog box (for printing)7job subrecordPpage rectangle4paper rectangle4PrClose procedure40PrCloseDoc procedure48PrClosePage procedure49PrCtlCall procedureiPrBitsCtl control constant58iPrDevCtl control constant60iPrEvtCtl control constant59iPrIOCtl control constant59PrDlgMain function44PrDrvrClose procedure57PrDrvrDCE function57PrDrvrOpen procedure56PrDrvrVers function58PrError function54PrGeneral procedure51DraftBitsOp opcode53GetRotnOp opcode53GetRslDataOp opcode51NoDraftBitsOp opcode53SetRslOp opcode52print record7job subrecord8printer information subrecord8PrintDefault procedure42printer driver3printer resource file3printing grafPort6Printing Managerjob dialog box7style dialog box7PrJobDialog function43PrJobInit function45PrJobMerge procedure46PrOpen procedure40PrOpenDoc function47PrOpenPage procedure48PrPicFile procedure50PrSetError procedure56PrStlDialog function43PrStlInit function45PrValidate function41Rresolution of devices5Sspool file4spool printing See deferred printing4style dialog box (for printing)7TTDftBitsBlk data type38TGetRotnBlk data type38TGetRslBlk data type35TGnlData data type35.See also PrGeneral procedure35TPrDlg data type39TPrInfo data type31TPrint data type30.See also print recordTPrJob data type31.See also job subrecordTPrStatus data type33TPrStl data type33TSetRslBlk data type37Vvariable resolution5ñ@ˇ ˇˇˇˇ@
  2. ˇ·ˇ‚7^, Palatino.Ä(*
  3. 4^Hÿˇˇ≥>ˇ◊°dONLNdƒHÂ.(›HInside Macintosh:
  4. H    4H     H
  5. ˇ·ˇ‚7^°dONLNd‰Hµ* Imaging
  6. à∫ÿ4à∫ÿ4üªË °dONLNdˇˇ(ߪPreliminary Draft
  7. ∂ª‘4∂ª”4πª–l    °dONLNdˇˇ* Developer TÎ@°dONLNdˇˇ)0echnical Publications°dONLNdˇˇ(Àª© $P°dONLNdˇˇ)    Apple ComputerZ†°dONLNdˇˇ)C , Inc. 1992
  8. à∫ÿÄQ°dONLNdˇˇ(öªˇ™@ˇ ˇˇˇˇ@
  9. ˇ·ˇ‚7^
  10. 4⁄`˙º4^*¿∫, Palatino
  11. .°dONLNd\*h1+*ee‡°dONLNd\2hï)Apple Computer, Inc. °dONLNdz*Ü≠(É*© 1991, Apple Computer, Inc.°dONLNd5Ñ*ê*
  12. All rights reserved.°dONLNdJì*ü±* Printed in the United States of °dONLNdkù*©R*
  13. America.°dONLNdt¨*∏±*The Apple logo is a registered °dONLNdì∂*¬∂*
  14. trademark of Apple Computer, °dONLNd∞¿*â*
  15. Inc. Use of the “keyboard” °dONLNdà*÷∏*
  16.  Apple logo (Option-Shift-K) for °dONLNdÏ‘*‡∞*
  17. commercial purposes without °dONLNdfi*Í•*
  18. the prior written consent of ˇˇN∑°dONLNd&Ë*Ùπ*
  19. Apple may constitute trademark °dONLNdEÚ*˛∏*
  20. infringement and unfair compe-°dONLNdc¸*π*
  21. #tition in violation of federal and °dONLNdÜ*X*
  22. state laws.°dONLNdí*!ç*Apple Computer, Inc. °dONLNd®*+í*
  23. 20525 Mariani Avenue  °dONLNdø)*5†*
  24. Cupertino, CA  95014-6299°dONLNdŸ3*?g*
  25. 408-996-1010  °dONLNdËB*N≥*Apple, the Apple logo, APDA, °dONLNdL*Xò*
  26. AppleLink, AppleShare, °dONLNdV*bÇ*
  27. AppleTalk, Apple IIP@°dONLNd0XÉaå)YGS
  28. ù°dONLNd2Vçb≥)
  29. , A/UX, °dONLNd:`*l≤(i*EtherTalk, HyperCard, Hyper-°dONLNdVj*vπ*
  30.  Talk, ImageWriter, LaserWriter, °dONLNdvt*Ä•*
  31. LocalTalk, Mac, Macintosh, °dONLNdë~*ä∑*
  32. MPW, MultiFinder, SANE, and °dONLNd≠à*îµ*
  33. TokenTalk are registered trade-°dONLNdÃí*û≥*
  34. marks of Apple Computer, Inc.°dONLNdͰ*≠©*Apple Desktop Bus, Balloon °dONLNd´*∑≥*
  35. Help, Finder, KanjiTalk, Moof, ˇˇÁ˰dONLNd$µ*¡π*
  36. QuickDraw, ResEdit, TrueType, °dONLNdBø*Àµ*
  37. and Zhong-Wen Talk are trade-°dONLNd_…*’≥*
  38. marks of Apple Computer, Inc.°dONLNd}ÿ*‰ó*Helvetica and Times are °dONLNdñ‚*Óô*
  39. registered trademarks of °dONLNd∞Ï*¯Ç*
  40. Linotype Company.ˇˇ%~°dONLNd¬˚*π*"ITC Zapf Dingbats is a registered °dONLNd‰*¢*
  41. trademark of International °dONLNdˇ*ç*
  42. Typeface Corporation.°dONLNd**∞*MacPaint is a registered trade-°dONLNd4(*4§*
  43. mark of Claris Corporation.°dONLNdP7*C¥*NuBus is a trademark of Texas °dONLNdoA*Mb*
  44. Instruments.°dONLNd|P*\≥*!PostScript is a registered trade-°dONLNdùZ*fô*
  45. mark, and Illustrator is a °dONLNdπd*pØ*
  46. trademark, of Adobe Systems °dONLNd÷n*zf*
  47. Incorporated.ˇˇ3√°dONLNd‰}*âπ*"Sony is a registered trademark of °dONLNdá*ì{*
  48. Sony Corporation.°dONLNdñ*¢∑*UNIX is a registered trademark °dONLNd7†*¨∞*
  49. of UNIX System Laboratories, °dONLNdT™*∂:*
  50. Inc.4^…¿YˇˇÜW°dONLNdY\…hX(e… Simultaneously published in the °dONLNdyf…r>*
  51. United States and Canada.°dONLNdìé…öJ*(Limited Warranty on Media °dONLNd≠ò…§*
  52. and Replacement°dONLNdΩ©…µ3*Even though Apple has °dONLNd‘≥…ø.*
  53. reviewed this manual, û‡°dONLNdÍ≥.øP)eAPPLE ˇˇ±°dONLNdΩ……S(Δ…MAKES NO WARRANTY OR ˇ˛ùǰdONLNd«…”S*
  54. REPRESENTATION, EITHER °dONLNd—…›;*
  55. EXPRESS OR IMPLIED, °dONLNd0€…ÁE*
  56. WITH RESPECT TO THIS °dONLNdEÂ…ÒE*
  57. MANUAL, ITS QUALITY, °dONLNdZÔ…˚I*
  58. ACCURACY, MERCHANT-°dONLNdm˘…N*
  59. ABILITY, OR FITNESS FOR °dONLNdÖ…N*
  60. A PARTICULAR PURPOSE. °dONLNdõ…,*
  61. AS A RESULT, THIS °dONLNdÆ…#<*
  62. MANUAL IS SOLD “AS °dONLNd¬!…-C*
  63. IS,” AND YOU, THE PUR-°dONLNdÿ+…7M*
  64. CHASER, ARE ASSUMING °dONLNdÌ5…AF*
  65. THE ENTIRE RISK AS TO °dONLNd?…K(*
  66. ITS QUALITY AND °dONLNdI…U *
  67. ACCURACY.  °dONLNd Z…fO*IN NO EVENT WILL APPLE °dONLNd7d…pC*
  68. BE LIABLE FOR DIRECT, °dONLNdNn…z1*
  69. INDIRECT, SPECIAL, °dONLNdbx…ÑJ*
  70. INCIDENTAL, OR CONSE-°dONLNdwÇ…é;*
  71. QUENTIAL DAMAGES °dONLNdâå…òB*
  72. RESULTING FROM ANY °dONLNdùñ…¢O*
  73. DEFECT OR INACCURACY °dONLNd≤†…¨'*
  74. IN THIS MANUAL, {†°dONLNd¬†(¨H)_even if °dONLNd ™…∂E(≥…advised of the possibility of °dONLNdË¥…¿*
  75. such damages.  °dONLNd¯≈…—;*THE WARRANTY AND °dONLNd    œ…€=*
  76. REMEDIES SET FORTH °dONLNdŸ…ÂD*
  77. ABOVE ARE EXCLUSIVE °dONLNd0„…Ô3*
  78. AND IN LIEU OF ALL °dONLNdDÌ…˘**
  79. OTHERS, ORAL OR °dONLNdU˜…?*
  80. WRITTEN, EXPRESS OR °dONLNdj…˙*
  81.     IMPLIED. Ó`°dONLNds˙H)1No Apple dealer, °dONLNdÑ …)(…agent, or employee is °dONLNdõ…!4*
  82. authorized to make any °dONLNd≥…+A*
  83. modification, extension, or °dONLNd–)…5?*
  84. addition to this warranty.  °dONLNdÌ:…FI*Some states do not allow the °dONLNd    
  85. D…P:*
  86. exclusion or limitation of °dONLNd    &N…ZO*
  87.  implied warranties or liability °dONLNd    FX…dR*
  88.  for incidental or consequential °dONLNd    fb…n/*
  89. damages, so the above ˇˇpr°dONLNd    }l…xS*
  90.  limitation or exclusion may not °dONLNd    ùv…ÇG*
  91. apply to you. This warranty °dONLNd    πÄ…åP*
  92. !gives you specific legal rights, °dONLNd    ⁄ä…ñK*
  93. and you may also have other ˇˇ‘Ô°dONLNd    ˆî…†S*
  94.  rights which vary from state to °dONLNd
  95. û…™‡*
  96. state.4^h¿¯ˇÜ@ˇ ˇˇˇˇ@
  97. ˇ·ˇ‚7^
  98. 4⁄∫˙,     Helvetica    .(‡∫Contents
  99. ‡(‡1ù)-‡)1(Ô∫Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/92, Palatino        (#∫CHAPTER )~1
  100. ~H-4~H- H°dONLNdˇˇ('∫Contents
  101. ˇ·ˇ‚7^ˇˇf|ˇÆ°dONLNdˇˇ(t∫The Printing Manager
  102. °dONLNdˇˇ*—Intr∑@°dONLNdˇˇ)oduction to Printing*†°dONLNdˇˇ)n2-3°dONLNdˇˇ(Rƒ!Methods and Qualities of Printing}¿°dONLNdˇˇ)´2-4°dONLNdˇˇ(_ƒPage and Paper Rectanglesë@°dONLNdˇˇ)ã2-4°dONLNdˇˇ(lƒPrinter Resolution?‡°dONLNdˇˇ)e2-5°dONLNdˇˇ(y∫About the Printing ManageræÄ°dONLNdˇˇ)ë2-6°dONLNdˇˇ(܃The User9†°dONLNdˇˇ))’s Formatting InputR@°dONLNdˇˇ)j2-6°dONLNdˇˇ(ìƒThe Print RecorVİdONLNdˇˇ)Ed and the Printing Loop܇°dONLNdˇˇ)~2-7°dONLNdˇˇ(†ƒ The Idle Pr6†°dONLNdˇˇ)1ocedurÕ‡°dONLNdˇˇ)eóİdONLNdˇˇ)2-8°dONLNdˇˇ(≠∫Using the Printing Manager˝¿°dONLNdˇˇ)è2-9°dONLNdˇˇ(∫ƒCr\°dONLNdˇˇ)  eating and Using the Print Recorc@°dONLNdˇˇ)êd°dONLNdˇˇ)2-9°dONLNdˇˇ(«ƒPrinting a Document¿°dONLNdˇˇ)q2-10°dONLNdˇˇ(‘Œ Printing Frï`°dONLNdˇˇ)0om the Finder› °dONLNdˇˇ)R2-15°dONLNdˇˇ(·Œ)Printing Each Page as a Separate Document#†°dONLNdˇˇ)’2-15°dONLNdˇˇ(ÓŒ Printing Frï`°dONLNdˇˇ)0om the Low-Level Interfacer@°dONLNdˇˇ)é2-16°dONLNdˇˇ(˚ƒChecking for PrGeneral@°dONLNdˇˇ)}2-16°dONLNdˇˇ(ƒ&Determining the Resolution of the CurrA@°dONLNdˇˇ)Æ ent PrinterS@°dONLNdˇˇ)C2-17°dONLNdˇˇ(ƒDetermining Page OrientationD`°dONLNdˇˇ)ö2-20°dONLNdˇˇ("ƒChoosing Draft-Quality Printing9¿°dONLNdˇˇ)§2-21°dONLNdˇˇ(/ƒ$Altering the Style or Job Dialog Box`°dONLNdˇˇ)≤2-23°dONLNdˇˇ(<ƒW¬†°dONLNdˇˇ)    riting an Idle Pru °dONLNdˇˇ)Focedur `°dONLNdˇˇ)e÷°dONLNdˇˇ)2-25°dONLNdˇˇ(IƒOptimizing PrintingO@°dONLNdˇˇ)n2-26°dONLNdˇˇ(VƒOptimizing PostScript Printingù@°dONLNdˇˇ)ù2-26°dONLNdˇˇ(cƒPrN†°dONLNdˇˇ)
  103. (oviding Names of Documents Being PrintedŒ¿°dONLNdˇˇ)◊2-27°dONLNdˇˇ(pƒ$Canceling or Pausing the Printing Pr?İdONLNdˇˇ)¢ocessh‡°dONLNdˇˇ)+2-28°dONLNdˇˇ(}ƒHandling Printing Err`°dONLNdˇˇ)bors©Ä°dONLNdˇˇ)!2-28°dONLNdˇˇ(äŒUsing Ó¿°dONLNdˇˇ)#Alert or Dialog Boxes to Report Err¿°dONLNdˇˇ)úors¨‡°dONLNdˇˇ)!2-28°dONLNdˇˇ(óŒInterpru†°dONLNdˇˇ)eting PrGeneral Errz‡°dONLNdˇˇ)Vors °dONLNdˇˇ)"2-29°dONLNdˇˇ(§∫Refer⁄ °dONLNdˇˇ)enceذdONLNdˇˇ)(2-29°dONLNdˇˇ(±ƒData Str``°dONLNdˇˇ)$ucturÊ@°dONLNdˇˇ)esχ°dONLNdˇˇ)2-29°dONLNdˇˇ(æŒTPrint  ô °dONLNdˇˇ)52-30ˇp@ˇ ˇˇˇˇ@
  104. ˇ·ˇ‚7^
  105. 4*\˜, Palatino.+ú"CHAPTER €`)\14⁄*˙¯,     Helvetica
  106. (‡*1 )-c)2    )iContents*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  107. °dONLNdˇˇ(e∞TPrInfo @°dONLNdˇˇ)92-31°dONLNdˇˇ(r∞TPrJob n°dONLNdˇˇ)52-31°dONLNdˇˇ(∞TPrStl áİdONLNdˇˇ)22-33°dONLNdˇˇ(å∞
  108. TPrStatus %†°dONLNdˇˇ)B2-33°dONLNdˇˇ(ô∞TPrPortQ °dONLNdˇˇ)72-34°dONLNdˇˇ(¶∞    TGnlData {@°dONLNdˇˇ)B2-35°dONLNdˇˇ(≥∞ TGetRslBlk 4İdONLNdˇˇ)I2-35°dONLNdˇˇ(¿∞ TSetRslBlk ” °dONLNdˇˇ)F2-37°dONLNdˇˇ(Õ∞ TDftBitsBlk ã°dONLNdˇˇ)J2-38°dONLNdˇˇ(⁄∞ TGetRotnBlk ò`°dONLNdˇˇ)P2-38°dONLNdˇˇ(Á∞TPrDlg Q¿°dONLNdˇˇ)72-39°dONLNdˇˇ(Ù¶Routines≠`°dONLNdˇˇ);2-40°dONLNdˇˇ(∞(Opening and Closing the Printing ManagerZ`°dONLNdˇˇ)‘2-40°dONLNdˇˇ(∞Filling and V†°dONLNdˇˇ)9erifying Print Recor‡°dONLNdˇˇ)Wds^†°dONLNdˇˇ)2-41°dONLNdˇˇ(∞4Displaying and Customizing the Printing Dialog Boxesú@°dONLNdˇˇ(∑2-43°dONLNdˇˇ((∞Printing¡@°dONLNdˇˇ)82-47°dONLNdˇˇ(5∞Optimizing PrintingO@°dONLNdˇˇ)n2-51°dONLNdˇˇ(B∞ErrS`°dONLNdˇˇ) or Handling´@°dONLNdˇˇ)J2-54°dONLNdˇˇ(O∞Low-Level Routinesß °dONLNdˇˇ)m2-56°dONLNdˇˇ(\∞Low-Level Contrfl°dONLNdˇˇ)Kol Calls·†°dONLNdˇˇ)52-58°dONLNdˇˇ(iúSummary†°dONLNdˇˇ)?2-61ˇj@ˇ ˇˇˇˇ@
  109. ˇ·ˇ‚7^
  110. 4⁄*˙¯,     Helvetica
  111. .(‡*1 )-c)3    )9Introduction to Printing*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/92, Palatino("lCHAPTER )_1    ˇˇ—ÚˇÆ°dONLNd8lCæ(@lThe Printing Managerˇˇˇˇˇˇ≠>(@Û1
  112. °dONLNd\lh∑(elJThis chapter describes the theory behind and implementation of printing frİdONLNd_\∏hŸ(e∏om the °dONLNdfhlt (ql#Macintosh computer to any printer: ?°dONLNdâh t)†YˇÄ°dONLNdäht‰).our application draws a printed document on a °dONLNd∏tlÄE(}l2printer just as it draws an image on a monitor scra‡°dONLNdÍtEÄÂ)Ÿ$een. This manner of printing allows °dONLNdÄlå(âlyou to use the same QuickDraw r†°dONLNd-ÄåÄ)îoutines for printing as for scr`°dONLNdLÄÅå≥)Å een displayѰdONLNdWÄ≤åÌ)1. The chapter °dONLNdeålò˜(ïl[also describes what your application needs to do to allow the user to print on any type of °dONLNd¿òl§F* 0printer and how you can optimize printing on difÿ‡°dONLNdòF§R)⁄ferª`°dONLNdÛòR§≠) ent types of printers.°dONLNd
  113. ™l∂r(≥lY@İdONLNd ™r∂‹)Tou should use this chapter if you want your application to allow the user to print. °dONLNd`ºl»É(≈lBeforÛ¿°dONLNdeºÉ»é)e r`°dONLNdhºè»„) eading this chapterÓ¿°dONLNd{º‚»Œ)S3, you should be familiar with QuickDraw’s drawing r ¿°dONLNdƺŒ»)Ïoutines .°dONLNd∂»l‘ë(—land the ,
  114. Courier°dONLNdæ»ë‘¡)%grafPort°dONLNdΔ»¡‘ı)0  data type. R`°dONLNd“»ı‘¸)4Yg`°dONLNd”»˚‘X)ou may also need to r9¿°dONLNdË»X‘â)] efer to the .9¿°dONLNd˛»â‘í)1Ww`°dONLNdˇ»í‘◊)    orldwide Softwarn`°dONLNd»◊‘⁄)Ee.R°dONLNd»€‘›) .°dONLNd‘l‡3(›l-volume for information about printing text fr∞İdONLNd>‘3‡ª)«om non-Roman script systems.°dONLNd[ÊlÚ∂(ÔlLThis chapter begins with a description of the elements of the printing envir≈`°dONLNdßÊ∂Úfl(Ô∂    onment:  °dONLNd∞Úl˛€(˚lXtypes of printing, page characteristics, and printer characteristics. Then it describes ,Zapf Dingbats°dONLNd    lq*n
  115. °dONLNd x“) printing a document°dONLNdl q(ln
  116. °dONLNd!x"
  117. ) optimizing printing performance°dONLNdA+l2q(1ln
  118. °dONLNdC(x4’) handling printing err*¿°dONLNdX(÷4„)^ors°dONLNd\=lDq(Cln
  119. °dONLNd^:xF≠) using picturˆ@°dONLNdj:≠F·)5
  120. e comments°dONLNduLlX$(Ul(For further information about the LaserWK‡°dONLNdùL$X◊)∏+riter printer and how it operates, see the °dONLNd»Xldã(alLaserWg‡°dONLNdŒXãd¥) riter Referù‡°dONLNdŸX¥d≈))ence °dONLNd›XΔd), published by ‡°dONLNdÏXd:)A    Addison-WÁ¿°dONLNdıX9dO)2esley¿°dONLNd˙XOdŒ). For information about how °dONLNddlp˘(mlPostScript works and the specifi‡°dONLNd6d˙pñ)é#cs of PostScript commands, see the <°dONLNdYdñpÏ)úPostScript Language °dONLNdmpl|Å(ylReferp°dONLNdrpÅ|µ) ence ManualéİdONLNd}pµ|
  121. )4, also published by ∑ °dONLNdëp
  122. |=)U    Addison-Wã°dONLNdöp=|S)3esley∑°dONLNdüpR|W). 
  123. Å*ú¯4Ç*ú¯
  124. ≠*µ¯4Æ*µ¯ Æ*Æ˛
  125. ˇ·ˇ‚7^ˇˇ£‰ˇÆ°dONLNd¢ö*¨’(®*Introduction to Printingˇˇˇˇˇˇ⁄|(®Ó1
  126. °dONLNdªΩl…Å(ΔlIn orj`°dONLNd¿ΩÅ…î)Ader for your application to print, it sends an image to a printerΔ°dONLNdΩì…Ô(Δì, taking into account °dONLNd…l’ñ(“l
  127. the featur    `°dONLNd!…ó’‹)+es the printer of∂@°dONLNd2…‹’Ì)EAfers, how the printer prints, and the size of the paper the user °dONLNds’l·ã(filwants. ˙ °dONLNdz’ã·ë)Y∫†°dONLNd{’ë·Á)Nour application doesn’t have to know the kind of printer the user has chosen, °dONLNd…·lÌ (Íl$because you call the same printing rR¿°dONLNdÌ· Ì4)ü
  128. outines, ró °dONLNd˜·4ÌG))egar¥‡°dONLNd˚·G̪)dless of the type of printery¿°dONLNd·ªÌ‹)t. These °dONLNdÌl˘o(ˆlrE°dONLNd Ìp˘õ)
  129. outines ar    `°dONLNd*Ìú˘_),.e translated into actual printing code by the 3@°dONLNdXÌ_˘∞)√printer resource fiH °dONLNdkÌ∞˘∫)Qle,°dONLNdn̪˘Ú)  which is on °dONLNd{˘lè(lthe userõ °dONLNdɢêt)$6’s system. (Each type of printer has its own printer rS†°dONLNdπ˘uç)Âesourõ‡°dONLNdæ˘çû)ce fibİdONLNd√˘ü„)le.) The printer °dONLNd‘lo(lrE°dONLNd’pà)esourç@°dONLNd⁄àô)ce fiS‡°dONLNdflö)le contains a device driver?‡°dONLNd˙?)s, called the C†°dONLNd?|)2printer driver£Ä°dONLNd|~)=,#İdONLNdÓ) that takes the document °dONLNd/ls(lfrò‡°dONLNd1sW)3om the Printing Manager and sends it to the printer‡†°dONLNddV¿)„. One printer driver can °dONLNd}l)¬(&lKcommunicate with several printers of the same type; for example, the LaserW„†°dONLNd»¡)˜(&¡riter printer °dONLNd÷)l5(2l#driver can work with several LaserWÂ`°dONLNd˘)5ã)£riter printers on a network.  õ†°dONLNd    )å5é)} °dONLNd    ;lGr(DlY@İdONLNd    ;rG„)Sour application should be device-independent when it prints a document, so that it °dONLNd    mGlSí(Pl    doesn’t r7‡°dONLNd    vGìS)'ely on any one printer featurä°dONLNd    ìGS=)~
  130. e being pr¥‡°dONLNd    ùG=S∂),esent. For instance, the curr‡‡°dONLNd    ∫G∂SÁ)y ent printer °dONLNd    ΔSl_È(\lthe user has selected may prg°dONLNd    ‚SÈ_)} oduce laserm@°dONLNd    ÌS_ı)22-quality or dot-matrix type, and your application °dONLNd
  131. _lkù(hl should be r%`°dONLNd
  132. *_ûkÊ)2Heady to handle both. The Printing Manager takes much of the work out of °dONLNd
  133. rklwÜ(tl@coming up with a single way to handle all possible printer envir%İdONLNd
  134. ≤káw€(táonments. HoweverÁ`°dONLNd
  135. ¬k⁄wfl)S, °dONLNd
  136. ƒwlÉ&(Äl(while you shouldn’t depend on any featur*@°dONLNd
  137. Ïw'ÉS)ª
  138. e being prU °dONLNd
  139. ˆwSÉÄ), esent, ther€Ä°dONLNd wÄÉê)-e arÍ °dONLNd wêÉÎ)e a few things about °dONLNd Élè(ål$printers of which you should be awaré°dONLNd >ÉèÔ)¶2e and which you can use to optimize printing: the °dONLNd pèlõÒ(òlZmethod of printing the user wants, the size of the paper on which the user will print the °dONLNd  õlß≈* document, and the r…İdONLNd ›õ≈ß*)Yesolution of the printerΩ@°dONLNd ıõ*ß,)e.ˇæ@ˇ ˇˇˇˇ@
  140. ˇ·ˇ‚7^
  141. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  142. (‡*1 )-c)4    )9Introduction to Printing*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  143. m*s¯4n*s¯ nln¯
  144. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd\lmX(il!Methods and Qualities of Printingˇˇˇˇˇˇ®(i1
  145. °dONLNd"slÄ(|lTher¿°dONLNd&sÅë)e ar`°dONLNd*sëµ)?e two basic methods of printing documents: immediate and deferrꆰdONLNdisµÿ(|µed. The °dONLNdqlãË(àlTPrinting Manager chooses which method to use by determining the capabilities of the °dONLNd≈ãló~* currذdONLNd…ã~ó)%ent printer and using the printing pr뇰dONLNdÓãó/)°efer>°dONLNdÚã0ó°)ences selected by the user◊†°dONLNd ã†óı)p.  The two printing °dONLNd ól£ù(†l
  146. methods arD†°dONLNd*óû£˙)2e implemented in dify†°dONLNd>ó˙£)\fer\ °dONLNdAó£K) ent ways for dif√°dONLNdQóK£W)Efer•İdONLNdTóW£è) ent printers. °dONLNdc©lµ≈(≤lImmediate printing0°dONLNdu©ΔµÒ)ZD means that the document prints as your application draws it in the .°dONLNdπµl¡ì(æl    printing ,
  147. Courier°dONLNd¬µì¡√)'grafPort°dONLNd µ√¡»)0. R`°dONLNdõ»¡œ)Yg`°dONLNdÕµŒ¡_)our QuickDraw drawing calls ar9¿°dONLNdε_¡¢)ëe converted dir  °dONLNd˙µ¢¡œ)C ectly into .°dONLNd¡lÕŒ( lMcommand codes the printer driver understands and uses to print the document.   °dONLNdR¡œÕ’( œYÀ†°dONLNdS¡‘ÕÂ)our °dONLNdWÕlŸì(÷lEprinting code, the data to be printed, and the printer driver code ar¿°dONLNdúÕîŸ≤(÷îe all prb@°dONLNd§Õ≤Ÿ÷)    esent in °dONLNd≠ŸlÂë(‚lmemoryÕ °dONLNd≥ŸêÂ9)$&. Immediate printing is also known as ‚¿°dONLNdŸŸ9Âp)©draft printing∂°dONLNdÁŸqÂx)8.  6°dONLNdÍŸyÂ{) °dONLNdÏÎl˜v(ÙlWÛ`°dONLNdÌÎu˜É)    ith oİdONLNdÒÎј”)deferred printingìİdONLNdΔ˜s)O%, the Printing Manager writes out a rC °dONLNd'Ît˜Ç)°epr”‡°dONLNd*ÎǘÕ)esentation of the °dONLNd<˜l(l$document’s printed image to a disk fiæÄ°dONLNda˜B)•le (called a j¿°dONLNdn˜Cd)2spool fi†°dONLNdv˜em)"leXİdONLNdx˜mÓ)) or possibly to memory; this °dONLNdñlé( lBinformation is then converted into a bit image and printed. Deferr)`°dONLNdÿè‡( èed printing is also °dONLNdÏlô(l    known as ª`°dONLNdıô—)-spool printing´°dONLNd“Ÿ)9.  +°dONLNd⁄‹) 
  148. (*5¯4)*4¯°dONLNdˇˇ(0lNOTE
  149. ˇ·ˇ‚7^
  150. °dONLNd2l>* The internal format of spool fiˇ°dONLNd'2>ñ)Ñ'les is private to the Printing Manager °dONLNdN>lJ≥(Gland may vary frë °dONLNd]>≥J$)Gom one printer to another©†°dONLNdv>$J))q. |°dONLNdx>)J/)Y<İdONLNdy>/Jü)ou should not attempt to °dONLNdíJlV˜(Sldetermine the format of these fi•@°dONLNd≤J˜V")ã les or use ,Zapf Dingbatsä °dONLNdˇˇ)/u
  151. ÿ °dONLNdˇˇ) °dONLNd”\lhÄ(elTher¿°dONLNd◊\Åhë)e ar`°dONLNd€\ëh°)@e also two qualities of printing: high-quality and draft-qualitye@°dONLNd\†h•(e†. e@°dONLNd\•h‚)High-quality °dONLNd*hltë(qlprintingA†°dONLNd2hítû)& prà¿°dONLNd5hûtÍ) Loduces documents that use all of the fonts and formatting that the user has °dONLNdÅtlÄò(}l
  152. included. ö†°dONLNdãtòĸ),Draft-quality printinga`°dONLNd°t˝Ä    )e pr®Ä°dONLNd§t    ÄÎ) 3oduces quick, low-quality drafts of text documents °dONLNd◊Älåà(âlthat ar °dONLNdfiÄâå#)#e printed straight down the page fr√°dONLNdÄ#åÁ)ö-om top to bottom and left to right. Generallyq`°dONLNd.ÄÁåÏ)ƒ, °dONLNd0ålò (ïl&only text is printed using the printerÖ‡°dONLNdVåò∞)°'’s internal fonts, without formatting.  °dONLNd}å±ò∂)§  °dONLNdİl®q(ßln
  153. °dONLNdÇûx™≠)
  154. The LaserW`°dONLNdåû≠™Ì)5riter printer pra@°dONLNdúûÌ™Å)@!oduces only high-quality output. °dONLNdæ≥l∫q(πln
  155. °dONLNd¿∞xº∞)
  156. The ImageW↰dONLNd ∞∞º)8riter printer can prô °dONLNdfi∞ºfi)R2oduce high-quality or draft-quality output. Deferr%¿°dONLNd∞flºÏ)›ed °dONLNdºx»®(≈x printing pr‡°dONLNdº©»Î)1oduces standar¡†°dONLNd,ºÎ»ƒ)B1d or high-quality printing; immediate printing pr‡°dONLNd]º≈»Ê)⁄oduces °dONLNdd»x‘€(—xdraft-quality printing. 
  157. ˙*¯4˙*ˇ¯ ˙l˙¯
  158. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd}Ël˘&(ılPage and Paper Rectanglesˇˇˇˇˇˇ®(ı1
  159. °dONLNdóˇl Ä(lTher¿°dONLNdõˇÅ ë)e ar`°dONLNdüˇë Ú)Pe two sizes to consider when printing a document: the physical size of the paper@°dONLNdÔˇÚ ˜(Ú, °dONLNdÒ lò(l
  160. and the arİdONLNd˚ ôÙ)-Nea on the paper that the printer can use to format the document, which should °dONLNdIl#|( l>be smaller than the physical sheet of paper to account for mar~°dONLNdá|#ì( |gins. °dONLNdé)l5(2lThe ª¿°dONLNdí)5¿)page rectangleç °dONLNd†)¡5«)B r“ °dONLNd¢)«5’)eprb‡°dONLNd•)÷5Á)Aesents the boundaries of the printable page. Its top left corner °dONLNdÊ5lA¬(>lalways has the coorİdONLNd˘5√A!)Wdinates (0,0); the coor[`°dONLNd    5!Afi)^,dinates of the bottom right corner give the °dONLNd    <AlMà(Jl=maximum page height and width attainable on the given printer∂ °dONLNd    yAàM√(Jà, in dots. The <@°dONLNd    àAƒM‡)<paper °dONLNd    éMlYï(Vl    rectangle&İdONLNd    óMñY-)*# gives the physical paper size, defi*İdONLNd    ªM-Yà)óned in the same coors@°dONLNd    œMàY„)[dinate system as the °dONLNd    ‰Yleá(blpage r‡°dONLNd    ÍYàe)!ectangle. Thus, the top left coord¿°dONLNd
  161. Yep)ädinates of the paper rØÄ°dONLNd
  162. !Ype†)^ ectangle arÉ@°dONLNd
  163. ,Y†e–)0 e typically °dONLNd
  164. 8elq(nl"negative and its bottom right coorÉ °dONLNd
  165. Zeq-)ñ
  166. dinates arʆ°dONLNd
  167. de-q=)+e grÑ`°dONLNd
  168. he>qæ)eater than those of the page rà@°dONLNd
  169. ÜeæqÁ)Ä
  170. ectangle. °dONLNd
  171. êql}É(zlThe rÄ¿°dONLNd
  172. ïqÉ}È)elationship of the two r‡°dONLNd
  173. ≠qÍ}J)gectangles is shown in o°dONLNd
  174. √qJ}b)`FigurA¿°dONLNd
  175. »qb}v)e 1-1fl@°dONLNd
  176. Õqv}{). fl@°dONLNd
  177. œq{}Ç)   _@°dONLNd
  178. “qÉ}Ö) ˇjd@ˇ ˇˇˇˇ@
  179. ˇ·ˇ‚7^
  180. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äIntroduction to Printing
  181. ‡(‡1ù)-‡)5(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  182. gHw4gHw"gH_
  183. ˇ·ˇ‚7^    °dONLNdˇˇ(dä
  184. Figure 1-1°dONLNd\Ãg:)BPage and paper rectangles 
  185. @°dONLNd\;g=)o 
  186. °dONLNdAäMê(JäY@İdONLNdAêMV),our application should always use the page rå@°dONLNdIAVMû)Δectangle sizes pr °dONLNdZAüMˇ)Iovided by the printer °dONLNdpMäY˚(VäRdriver and should not attempt to change them or add new ones. If your application °dONLNd¬Yäe3* &supports page size other than those pr{`°dONLNdËY3e„)©)ovided by the printer driver for the curr√İdONLNdY„eÛ)∞ent °dONLNdeäq®(näprintero¿°dONLNde®q), you risk compatibility prb†°dONLNd7eqT)s oblems with İdONLNdCeTq)9)Apple’s printer drivers and those of thir‰ °dONLNdleq)∞d-°dONLNdnqä}Í(zäparty printer makers. °dONLNdÖÉäè4*&When formatting a page for printing, rfl†°dONLNd´É4èø)™emember that in general the scr°dONLNd É¿è)åeen is wider than °dONLNd‹èäõΔ(òäit is tall, wherö@°dONLNdÏèΔõe)<(eas the page is taller than it is wide. ˙@°dONLNdèeõk)üY∫¿°dONLNdèkõ◊)ou should use the page rQİdONLNd-èÿõ)mectangle size °dONLNd;õäß
  187. (§äthat the user has chosen in orE†°dONLNdYõ ßû)Å!der to format the document. (See Ê °dONLNdzõûßË)ì“The Print Recorº†°dONLNdäõËß)J
  188. d and the °dONLNdîßä≥˝(∞äPrinting Loop” on page 1-ø¿°dONLNd≠ß˝≥)s7ø¿°dONLNdÆß≥%) for morä@°dONLNd∂ß&≥ó)$e information about wher凰dONLNdŒßó≥Ø)qe to fi °dONLNd’ß∞≥·) nd the user£`°dONLNd‡ß‚≥)2 ’s choices °dONLNdÎ≥äø(ºäfor formatting the document.) 
  189. ‰HÍ4ÂHÍ ÂäÂ
  190. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd
  191. ”ä‰ *$Printer Resolution ˇˇˇˇˇˇ®(‡1
  192. °dONLNdÍ䈪(Ûä
  193. Resolutiony¿°dONLNd(ͺˆÏ)2  is the degr6°dONLNd4Í̈≈)13ee of clarity of your display device, whether a scr¸`°dONLNdgÍ≈ˆ)ÿeen or a printer8‡°dONLNdwÍ    ˆ)D. °dONLNdyˆäë(ˇäA∫†°dONLNdzˆëÎ) monitor has better rŒ°dONLNdèˆÎæ)Z1esolution than a television set used as a monitorÈ °dONLNd¿ˆæı)”, and a laser °dONLNdŒä‹( äprinter has better r¿°dONLNd‚›v)S#esolution than a dot-matrix printer`°dONLNdvˆ)ô. Resolution is usually specifiP@°dONLNd$ˆ)Äed in °dONLNd*ä≈(ädots per inchͰdONLNd7≈");, or dpi, in the X and ⁄İdONLNdN"()]YX`°dONLNdO)8) dir°Ä°dONLNdS8“)$ections. The higher the value, the fiC °dONLNdx”)õner the detail °dONLNdáä&≈(#äof the image. ;‡°dONLNdïΔ&»)< °dONLNdó,ä8ë(5äA∫†°dONLNdò,ë8) printer supports either discrê°dONLNd∂,8U)ete or variable rÕ†°dONLNd«,U8Ä)E
  194. esolution.*‡°dONLNd—,Å8É), ™‡°dONLNd“,É8Ÿ)Discrete resolution臰dONLNdÂ,⁄8)W  means that °dONLNdÒ8äD(Aäthe application can choose fr¢°dONLNd8Dw)~om a limited number of rü °dONLNd&8wD∞)oesolutions prİdONLNd38±DΔ):edefiº@°dONLNd88ΔD˜) ned by the °dONLNdCDäPΔ(Mäprinter driverI°dONLNdQDΔP<)<. For example, the ImageWe‡°dONLNdjD<P«)v!riter printer supports four discrV°dONLNdãD«P⁄)ãete rp†°dONLNdêD⁄P ) esolutions: °dONLNdúPä\ñ(Yä72 ,    Symbol°dONLNdüPó[ú)¥}°dONLNd†Pú\–) 72 dpi, 144 @°dONLNd≠P—[÷)5¥Ä@°dONLNdÆP÷\
  195. ) 144 dpi, 80 İdONLNdªP [)5¥ÉİdONLNdºP\W) 72 dpi, and 160 v‡°dONLNdÕPX[])H¥Û‡°dONLNdŒP]\Ö)
  196.  144 dpi. ˙ °dONLNdÿPÖ\á)( °dONLNd⁄bänë(käV+İdONLNd€bën·)ariable resolution˜‡°dONLNdÌb·ni)P means the application can defi·°dONLNd bjnç)âne any r¨`°dONLNdbén¸)$esolution within a range °dONLNd-näzã(wä1bounded by maximum and minimum values. The LaserW√¿°dONLNd^näz(wäriter printer driver supports °dONLNd|zäÜ¥(Éä
  197. variable r‡°dONLNdÜz¥Ü))*esolution within a range frü†°dONLNd°z)ÜŸ)u(om 25 dpi to 1500 dpi in both the X and @İdONLNd…z⁄܇)±Yæ`°dONLNd z‡ÜÔ) dirİdONLNdŒzÜ)    ections. °dONLNd◊Üäí∂(èä(However`İdONLNdflÜ∂í‰),
  198. , a LaserW8 °dONLNdÈ܉íÿ).7riter printer that uses PostScript supports a maximum r∂¿°dONLNd Üÿí)Ùesolution of °dONLNd-íäûõ(õä300 °dONLNd1íúù°)¥}°dONLNd2í°û®); 300 dpi. Some other PostScript devices that use the LaserWÌ`°dONLNdmíßû(õßriter printer driver can °dONLNdÜûä™—(ßäachieve higher r°dONLNdñû—™Õ)G5esolutions, up to the maximum supported by the LaserWo‡°dONLNdÀûÕ™˝)¸ riter drivere`°dONLNd◊û˝™)0.) 
  199. wÜ)4wá)
  200. wá)è4vÜwáò"@@wá∑èfl?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯˛¿˛ Ä¸?Òˇ¯˛ ˛ Ä¸?Òˇ¯˛<Êcc}«ò¸?Òˇ¯˛ˇ¡ΔüBÙß)º¸?Òˇ¯˛òBÑ;)†¸?Òˇ¯˛ÁBsø'ú¸?Òˇ¯¸Ä˛˚?Òˇ¯¸Ä˛˚ ?Òˇ¯¸Ä˜?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Òò"@Ä@Ä∑á˜è?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯˝8˛ Ä¸?Òˇ¯˝$˛ Ä¸?Òˇ¯˝'úΔc}«ò¸?Ìˇ8‰Ùß)º¸?Òˇ¯˝#eÑ;)†¸?Òˇ¯˝!‹‰sø'ú¸?Òˇ¯¸˛˚?Òˇ¯¸8˛˚?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Òò"ĿĿ˜á6è?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Ò?Òˇ¯Òflflflflflflflflflflflflflflflflflflflflflò"¿¿6ávèflflflflflflflflflflflflflflfl˛ ?¿èÅ$˝C‡˝˝˛ Ä@@‚à˝    ¡¿Ä˝˛˛@@"à˝    A@Ä˝!˛Cˆ¸}<‡!àá∞„¡>gÑΔ1…·Ë«˛!˛ƒíR    ì@!…HîA„í    HåíI(˛!˛Dí_Ç\!É…|xîA˙迺íIˆ˛!˛CP@!ÇΔ@Xîa Ç»D¨ëâ˛!˛ÁèÔ;ª r¡o<-€√Öûg∏W€‹˛˛˝@˝Ä˝¸ ˝˝¿˛Ä˛Ä˝¸`˝˝ˆ¸8¸Ä˝fl˛A80‡¡pcÔ˘˛  Cà0D$¿˙˛` à(»@˙˛éO0¢Ü1Ôèã◊ù<<)Ht¿˙˛
  201. P—H£$IJ¢ëÒ2KH)H'˘˛
  202. LQ|/ /¬¢ÅIH&H$Ä˙˛
  203. BQ¿+"(G£QÑÅI0$D$¿˙˛|Ô<:uúÉ«∏Ófiœ%√øgªxt„Œd˙˜Ä˚˝Ñˆ˜Ä˚˝åˆÎpˆfl˛@¸pÓ˛ ¿ Ó˛
  204. @ Ó˛
  205. >˘0ˆ}∑c¿/Ô˛ EH!I"íë$§Ô˛ E|!I"í˘$†Ô˛  ëE@ÒI"íÅ$¢Ô˛1fi{º̺y{ê~‹Ä˝@˝ Ì˝@˝ Ì ˝8‡˝pÍfl
  206. ˛81¸¿Á ˛!$@HË
  207. ˛` @Á ˛†#ÿD€¿È ˛†!$FI È ˛ !>^I È ˛ ! VI È ˛:tsûÎ?∞Èflflflfl˛`˝ÄÎò"
  208. 
  209. váÄè˛
  210.  ÄÇ@β
  211.  ÄÑ Î˛
  212. -ù¸ú˜É Î˛
  213. $†ê…
  214. Ñ Î˛
  215. $òì…
  216. Ñ Î˛
  217. $Ñí…ä    Ç@βs¯ydwÄÎflflflòÅ@HH<MIJˇˇˇˇˇˇˇˇˇˇÃÃˇˇˇˇôôˇˇˇˇffˇˇˇˇ33ˇˇˇˇˇˇÃÃˇˇˇˇÃÃÃÃˇˇÃÃôô    ˇˇÃÃff
  218. ˇˇÃÃ33 ˇˇÃà ˇˇôôˇˇˇˇôôÃÃˇˇôôôôˇˇôôffˇˇôô33ˇˇôôˇˇffˇˇˇˇffÃÃˇˇffôôˇˇffffˇˇff33ˇˇffˇˇ33ˇˇˇˇ33ÃÃˇˇ33ôôˇˇ33ffˇˇ3333ˇˇ33ˇˇˇˇˇˇÃàˇˇôô!ˇˇff"ˇˇ33#ˇˇ$ÃÃˇˇˇˇ%ÃÃˇˇÃÃ&ÃÃˇˇôô'ÃÃˇˇff(ÃÃˇˇ33)ÃÃˇˇ*ÃÃÃÃˇˇ+ÃÃÃÃÃÃ,ÃÃÃÃôô-ÃÃÃÃff.ÃÃÃÃ33/ÃÃÃÃ0ÃÃôôˇˇ1ÃÃôôÃÃ2ÃÃôôôô3ÃÃôôff4ÃÃôô335ÃÃôô6ÃÃffˇˇ7ÃÃffÃÃ8ÃÃffôô9ÃÃffff:ÃÃff33;ÃÃff<ÃÃ33ˇˇ=ÃÃ33ÃÃ>ÃÃ33ôô?ÃÃ33ff@ÃÃ3333AÃÃ33BÃÃˇˇCÃÃÃÃDÃÃôôEÃÃffFÃÃ33GÃÃHôôˇˇˇˇIôôˇˇÃÃJôôˇˇôôKôôˇˇffLôôˇˇ33MôôˇˇNôôÃÃˇˇOôôÃÃÃÃPôôÃÃôôQôôÃÃffRôôÃÃ33SôôÃÃTôôôôˇˇUôôôôÃÃVôôôôôôWôôôôffXôôôô33YôôôôZôôffˇˇ[ôôffÃÃ\ôôffôô]ôôffff^ôôff33_ôôff`ôô33ˇˇaôô33ÃÃbôô33ôôcôô33ffdôô3333eôô33fôôˇˇgôôÃÃhôôôôiôôffjôô33kôôlffˇˇˇˇmffˇˇÃÃnffˇˇôôoffˇˇffpffˇˇ33qffˇˇrffÃÃˇˇsffÃÃÃÃtffÃÃôôuffÃÃffvffÃÃ33wffÃÃxffôôˇˇyffôôÃÃzffôôôô{ffôôff|ffôô33}ffôô~ffffˇˇffffÃÃÄffffôôÅffffffÇffff33ÉffffÑff33ˇˇÖff33ÃÃÜff33ôôáff33ffàff3333âff33äffˇˇãffÃÃåffôôçfffféff33èffê33ˇˇˇˇë33ˇˇÃÃí33ˇˇôôì33ˇˇffî33ˇˇ33ï33ˇˇñ33ÃÃˇˇó33ÃÃÃÃò33ÃÃôôô33ÃÃffö33ÃÃ33õ33ÃÃú33ôôˇˇù33ôôÃÃû33ôôôôü33ôôff†33ôô33°33ôô¢33ffˇˇ£33ffÃç33ffôô•33ffff¶33ff33ß33ff®3333ˇˇ©3333ÃÙ3333ôô´3333ff¨333333≠3333Æ33ˇˇØ33ÃÃ∞33ôô±33ff≤3333≥33¥ˇˇˇˇµˇˇÃÃ∂ˇˇôô∑ˇˇff∏ˇˇ33πˇˇ∫ÃÃˇˇªÃÃÃúÃÃôôΩÃÃffæÃÃ33øÃÿôôˇˇ¡ôôÃìôôôô√ôôffƒôô33≈ôôΔffˇˇ«ffÃûffôô…ffff ff33ÀffÃ33ˇˇÕ33ÃÃŒ33ôôœ33ff–3333—33“ˇˇ”ÃÑôô’ff÷33◊ÿˇˇˇŸ˘`˘`˘`⁄Ú–Ú–Ú–€Ï@Ï@Ï@‹Â∞Â∞Â∞›fl fl fl fiÿêÿêÿêfl“““‡ÀpÀpÀp·ƒ‡ƒ‡ƒ‡‚æPæPæP„∑¿∑¿∑¿‰±0±0±0™†™†™†Ê§§§ÁùÄùÄùÄËñññÈê`ê`ê`Íâ–â–â–ÎÉ@É@É@Ï|∞|∞|∞Ìv v v ÓoêoêoêÔiiibpbpbpÒ[‡[‡[‡ÚUPUPUPÛN¿N¿N¿ÙH0H0H0ıA†A†A†ˆ;;;˜4Ä4Ä4į---˘'`'`'`˙ – – –˚@@@¸∞∞∞˝   ˛êêê@wá∑è'ÅÅ˘    ŎˆˇÜ ˇÅ¯ˇÜ ˇÅ¯ˇÜ ˇÅ¯ˇÜˇ˙ˇˇˇ˝ˇˇˇçˇÜˇ˙ˇˇˇˇˇˇçˇÜˇ˚ˇˇˇˇˇˇéˇÜˇ˚ˇˇˇˇˇˇéˇÜˇ˚ˇˇˇˇˇˇéˇÜˇ˚ˇ˛ˇˇˇˇˇ˛ˇéˇÜ"ˇ˙ˇ˚ˇ¸ˇçˇfl˛ˇ·ˇÙˇ⁄!ˇ˙ˇıˇçˇflˇˇ‚ˇÙˇ⁄?ˇÅ¯ˇflˇ˝ˇ˛ˇˇˇˇˇ˛ˇˇˇˇ˛ˇˇ¸ˇ˛ˇ˛˝ˇˇˇfiBˇÅ¯ˇ˛Áˇ¸˛ˇ˛ˇˇˇ¸ˇˇ˝ˇ˝ˇˇˇˇ˛ˇ    ˇˇˇˇ˝ˇflÆˇıˇˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇÙˇflˇ˛    ˇˇˇˇˇˇ˝ˇ˝ˇˇ˝ˇ˝˛ˇˇˇˇˇˇˇˇ‹Dˇıˇëˇˆˇflˇ˝˛ˇ˛ˇ˛ˇˇ˝ˇ˛ˇ˛ˇ˚ˇˇ˝ˇ˛ˇflˇıˇëˇˆˇ÷ˇ€ˇŸˇÑˇˆˇ÷ˇfi˛ˇÿˇÅ¯ˇ÷ˇ≤ˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜòÅ@ÄHH8NIJˇˇˇˇˇˇˇˇˇˇÃÃˇˇˇˇôôˇˇˇˇffˇˇˇˇ33ˇˇˇˇˇˇÃÃˇˇˇˇÃÃÃÃˇˇÃÃôô    ˇˇÃÃff
  219. ˇˇÃÃ33 ˇˇÃà ˇˇôôˇˇˇˇôôÃÃˇˇôôôôˇˇôôffˇˇôô33ˇˇôôˇˇffˇˇˇˇffÃÃˇˇffôôˇˇffffˇˇff33ˇˇffˇˇ33ˇˇˇˇ33ÃÃˇˇ33ôôˇˇ33ffˇˇ3333ˇˇ33ˇˇˇˇˇˇÃàˇˇôô!ˇˇff"ˇˇ33#ˇˇ$ÃÃˇˇˇˇ%ÃÃˇˇÃÃ&ÃÃˇˇôô'ÃÃˇˇff(ÃÃˇˇ33)ÃÃˇˇ*ÃÃÃÃˇˇ+ÃÃÃÃÃÃ,ÃÃÃÃôô-ÃÃÃÃff.ÃÃÃÃ33/ÃÃÃÃ0ÃÃôôˇˇ1ÃÃôôÃÃ2ÃÃôôôô3ÃÃôôff4ÃÃôô335ÃÃôô6ÃÃffˇˇ7ÃÃffÃÃ8ÃÃffôô9ÃÃffff:ÃÃff33;ÃÃff<ÃÃ33ˇˇ=ÃÃ33ÃÃ>ÃÃ33ôô?ÃÃ33ff@ÃÃ3333AÃÃ33BÃÃˇˇCÃÃÃÃDÃÃôôEÃÃffFÃÃ33GÃÃHôôˇˇˇˇIôôˇˇÃÃJôôˇˇôôKôôˇˇffLôôˇˇ33MôôˇˇNôôÃÃˇˇOôôÃÃÃÃPôôÃÃôôQôôÃÃffRôôÃÃ33SôôÃÃTôôôôˇˇUôôôôÃÃVôôôôôôWôôôôffXôôôô33YôôôôZôôffˇˇ[ôôffÃÃ\ôôffôô]ôôffff^ôôff33_ôôff`ôô33ˇˇaôô33ÃÃbôô33ôôcôô33ffdôô3333eôô33fôôˇˇgôôÃÃhôôôôiôôffjôô33kôôlffˇˇˇˇmffˇˇÃÃnffˇˇôôoffˇˇffpffˇˇ33qffˇˇrffÃÃˇˇsffÃÃÃÃtffÃÃôôuffÃÃffvffÃÃ33wffÃÃxffôôˇˇyffôôÃÃzffôôôô{ffôôff|ffôô33}ffôô~ffffˇˇffffÃÃÄffffôôÅffffffÇffff33ÉffffÑff33ˇˇÖff33ÃÃÜff33ôôáff33ffàff3333âff33äffˇˇãffÃÃåffôôçfffféff33èffê33ˇˇˇˇë33ˇˇÃÃí33ˇˇôôì33ˇˇffî33ˇˇ33ï33ˇˇñ33ÃÃˇˇó33ÃÃÃÃò33ÃÃôôô33ÃÃffö33ÃÃ33õ33ÃÃú33ôôˇˇù33ôôÃÃû33ôôôôü33ôôff†33ôô33°33ôô¢33ffˇˇ£33ffÃç33ffôô•33ffff¶33ff33ß33ff®3333ˇˇ©3333ÃÙ3333ôô´3333ff¨333333≠3333Æ33ˇˇØ33ÃÃ∞33ôô±33ff≤3333≥33¥ˇˇˇˇµˇˇÃÃ∂ˇˇôô∑ˇˇff∏ˇˇ33πˇˇ∫ÃÃˇˇªÃÃÃúÃÃôôΩÃÃffæÃÃ33øÃÿôôˇˇ¡ôôÃìôôôô√ôôffƒôô33≈ôôΔffˇˇ«ffÃûffôô…ffff ff33ÀffÃ33ˇˇÕ33ÃÃŒ33ôôœ33ff–3333—33“ˇˇ”ÃÑôô’ff÷33◊ÿˇˇˇŸ˘`˘`˘`⁄Ú–Ú–Ú–€Ï@Ï@Ï@‹Â∞Â∞Â∞›fl fl fl fiÿêÿêÿêfl“““‡ÀpÀpÀp·ƒ‡ƒ‡ƒ‡‚æPæPæP„∑¿∑¿∑¿‰±0±0±0™†™†™†Ê§§§ÁùÄùÄùÄËñññÈê`ê`ê`Íâ–â–â–ÎÉ@É@É@Ï|∞|∞|∞Ìv v v ÓoêoêoêÔiiibpbpbpÒ[‡[‡[‡ÚUPUPUPÛN¿N¿N¿ÙH0H0H0ıA†A†A†ˆ;;;˜4Ä4Ä4į---˘'`'`'`˙ – – –˚@@@¸∞∞∞˝   ˛êêê@Ä∑á˜è' ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇ‹˛ˇ‰ˇÙˇ⁄ˇÅ¯ˇ‹ˇˇÂˇÙˇ⁄>ˇıˇÖˇ‹ˇ˝ˇ˛ˇˇˇ˛ˇˇˇˇ˛ˇˇ¸ˇ˛ˇ˛˝ˇˇˇfiBˇıˇëˇÿˇ˚˛ˇ˛˛ˇˇ˝ˇˇ˝ˇˇˇˇ˛ˇ    ˇˇˇˇ˝ˇflAˇıˇëˇˆˇ‹ˇ˛    ˇˇˇˇˇˇ¸ˇˇ˝ˇ˝˛ˇˇˇˇˇˇˇˇ‹=ˇÑˇˆˇ‹ˇ˝˛ˇ˛ˇ˛ˇˇ˛˛ˇ˛ˇ˚ˇˇ˝ˇ˛ˇflˇÅ¯ˇ—ˇ‡ˇŸˇıˇÖˇ‘˛ˇ‚˛ˇÿˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜòÅÄ¿HH<OIJˇˇˇˇˇˇˇˇˇˇÃÃˇˇˇˇôôˇˇˇˇffˇˇˇˇ33ˇˇˇˇˇˇÃÃˇˇˇˇÃÃÃÃˇˇÃÃôô    ˇˇÃÃff
  220. ˇˇÃÃ33 ˇˇÃà ˇˇôôˇˇˇˇôôÃÃˇˇôôôôˇˇôôffˇˇôô33ˇˇôôˇˇffˇˇˇˇffÃÃˇˇffôôˇˇffffˇˇff33ˇˇffˇˇ33ˇˇˇˇ33ÃÃˇˇ33ôôˇˇ33ffˇˇ3333ˇˇ33ˇˇˇˇˇˇÃàˇˇôô!ˇˇff"ˇˇ33#ˇˇ$ÃÃˇˇˇˇ%ÃÃˇˇÃÃ&ÃÃˇˇôô'ÃÃˇˇff(ÃÃˇˇ33)ÃÃˇˇ*ÃÃÃÃˇˇ+ÃÃÃÃÃÃ,ÃÃÃÃôô-ÃÃÃÃff.ÃÃÃÃ33/ÃÃÃÃ0ÃÃôôˇˇ1ÃÃôôÃÃ2ÃÃôôôô3ÃÃôôff4ÃÃôô335ÃÃôô6ÃÃffˇˇ7ÃÃffÃÃ8ÃÃffôô9ÃÃffff:ÃÃff33;ÃÃff<ÃÃ33ˇˇ=ÃÃ33ÃÃ>ÃÃ33ôô?ÃÃ33ff@ÃÃ3333AÃÃ33BÃÃˇˇCÃÃÃÃDÃÃôôEÃÃffFÃÃ33GÃÃHôôˇˇˇˇIôôˇˇÃÃJôôˇˇôôKôôˇˇffLôôˇˇ33MôôˇˇNôôÃÃˇˇOôôÃÃÃÃPôôÃÃôôQôôÃÃffRôôÃÃ33SôôÃÃTôôôôˇˇUôôôôÃÃVôôôôôôWôôôôffXôôôô33YôôôôZôôffˇˇ[ôôffÃÃ\ôôffôô]ôôffff^ôôff33_ôôff`ôô33ˇˇaôô33ÃÃbôô33ôôcôô33ffdôô3333eôô33fôôˇˇgôôÃÃhôôôôiôôffjôô33kôôlffˇˇˇˇmffˇˇÃÃnffˇˇôôoffˇˇffpffˇˇ33qffˇˇrffÃÃˇˇsffÃÃÃÃtffÃÃôôuffÃÃffvffÃÃ33wffÃÃxffôôˇˇyffôôÃÃzffôôôô{ffôôff|ffôô33}ffôô~ffffˇˇffffÃÃÄffffôôÅffffffÇffff33ÉffffÑff33ˇˇÖff33ÃÃÜff33ôôáff33ffàff3333âff33äffˇˇãffÃÃåffôôçfffféff33èffê33ˇˇˇˇë33ˇˇÃÃí33ˇˇôôì33ˇˇffî33ˇˇ33ï33ˇˇñ33ÃÃˇˇó33ÃÃÃÃò33ÃÃôôô33ÃÃffö33ÃÃ33õ33ÃÃú33ôôˇˇù33ôôÃÃû33ôôôôü33ôôff†33ôô33°33ôô¢33ffˇˇ£33ffÃç33ffôô•33ffff¶33ff33ß33ff®3333ˇˇ©3333ÃÙ3333ôô´3333ff¨333333≠3333Æ33ˇˇØ33ÃÃ∞33ôô±33ff≤3333≥33¥ˇˇˇˇµˇˇÃÃ∂ˇˇôô∑ˇˇff∏ˇˇ33πˇˇ∫ÃÃˇˇªÃÃÃúÃÃôôΩÃÃffæÃÃ33øÃÿôôˇˇ¡ôôÃìôôôô√ôôffƒôô33≈ôôΔffˇˇ«ffÃûffôô…ffff ff33ÀffÃ33ˇˇÕ33ÃÃŒ33ôôœ33ff–3333—33“ˇˇ”ÃÑôô’ff÷33◊ÿˇˇˇŸ˘`˘`˘`⁄Ú–Ú–Ú–€Ï@Ï@Ï@‹Â∞Â∞Â∞›fl fl fl fiÿêÿêÿêfl“““‡ÀpÀpÀp·ƒ‡ƒ‡ƒ‡‚æPæPæP„∑¿∑¿∑¿‰±0±0±0™†™†™†Ê§§§ÁùÄùÄùÄËñññÈê`ê`ê`Íâ–â–â–ÎÉ@É@É@Ï|∞|∞|∞Ìv v v ÓoêoêoêÔiiibpbpbpÒ[‡[‡[‡ÚUPUPUPÛN¿N¿N¿ÙH0H0H0ıA†A†A†ˆ;;;˜4Ä4Ä4į---˘'`'`'`˙ – – –˚@@@¸∞∞∞˝   ˛êêêÄ¿˜á6è'ˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜˇıˇÖˇÜˇıˇëˇˆˇÜˇıˇëˇˆˇÜˇÑˇˆˇÜ ˇÅ¯ˇÜ|ˇı˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇ˛ˇıˇÜ ˇÅ¯ˇÜ ˇÅ¯ˇÜ ˇÅ¯ˇÜ ˇÅ¯ˇÜ ˇÅ¯ˇÜ ˇÅ¯ˇÜ ˇÅ¯ˇÜ ˇÅ¯ˇÜ ˇÅ¯ˇÜ    ŎˆˇÜÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘òÅ¿HH8PIJˇˇˇˇˇˇˇˇˇˇÃÃˇˇˇˇôôˇˇˇˇffˇˇˇˇ33ˇˇˇˇˇˇÃÃˇˇˇˇÃÃÃÃˇˇÃÃôô    ˇˇÃÃff
  221. ˇˇÃÃ33 ˇˇÃà ˇˇôôˇˇˇˇôôÃÃˇˇôôôôˇˇôôffˇˇôô33ˇˇôôˇˇffˇˇˇˇffÃÃˇˇffôôˇˇffffˇˇff33ˇˇffˇˇ33ˇˇˇˇ33ÃÃˇˇ33ôôˇˇ33ffˇˇ3333ˇˇ33ˇˇˇˇˇˇÃàˇˇôô!ˇˇff"ˇˇ33#ˇˇ$ÃÃˇˇˇˇ%ÃÃˇˇÃÃ&ÃÃˇˇôô'ÃÃˇˇff(ÃÃˇˇ33)ÃÃˇˇ*ÃÃÃÃˇˇ+ÃÃÃÃÃÃ,ÃÃÃÃôô-ÃÃÃÃff.ÃÃÃÃ33/ÃÃÃÃ0ÃÃôôˇˇ1ÃÃôôÃÃ2ÃÃôôôô3ÃÃôôff4ÃÃôô335ÃÃôô6ÃÃffˇˇ7ÃÃffÃÃ8ÃÃffôô9ÃÃffff:ÃÃff33;ÃÃff<ÃÃ33ˇˇ=ÃÃ33ÃÃ>ÃÃ33ôô?ÃÃ33ff@ÃÃ3333AÃÃ33BÃÃˇˇCÃÃÃÃDÃÃôôEÃÃffFÃÃ33GÃÃHôôˇˇˇˇIôôˇˇÃÃJôôˇˇôôKôôˇˇffLôôˇˇ33MôôˇˇNôôÃÃˇˇOôôÃÃÃÃPôôÃÃôôQôôÃÃffRôôÃÃ33SôôÃÃTôôôôˇˇUôôôôÃÃVôôôôôôWôôôôffXôôôô33YôôôôZôôffˇˇ[ôôffÃÃ\ôôffôô]ôôffff^ôôff33_ôôff`ôô33ˇˇaôô33ÃÃbôô33ôôcôô33ffdôô3333eôô33fôôˇˇgôôÃÃhôôôôiôôffjôô33kôôlffˇˇˇˇmffˇˇÃÃnffˇˇôôoffˇˇffpffˇˇ33qffˇˇrffÃÃˇˇsffÃÃÃÃtffÃÃôôuffÃÃffvffÃÃ33wffÃÃxffôôˇˇyffôôÃÃzffôôôô{ffôôff|ffôô33}ffôô~ffffˇˇffffÃÃÄffffôôÅffffffÇffff33ÉffffÑff33ˇˇÖff33ÃÃÜff33ôôáff33ffàff3333âff33äffˇˇãffÃÃåffôôçfffféff33èffê33ˇˇˇˇë33ˇˇÃÃí33ˇˇôôì33ˇˇffî33ˇˇ33ï33ˇˇñ33ÃÃˇˇó33ÃÃÃÃò33ÃÃôôô33ÃÃffö33ÃÃ33õ33ÃÃú33ôôˇˇù33ôôÃÃû33ôôôôü33ôôff†33ôô33°33ôô¢33ffˇˇ£33ffÃç33ffôô•33ffff¶33ff33ß33ff®3333ˇˇ©3333ÃÙ3333ôô´3333ff¨333333≠3333Æ33ˇˇØ33ÃÃ∞33ôô±33ff≤3333≥33¥ˇˇˇˇµˇˇÃÃ∂ˇˇôô∑ˇˇff∏ˇˇ33πˇˇ∫ÃÃˇˇªÃÃÃúÃÃôôΩÃÃffæÃÃ33øÃÿôôˇˇ¡ôôÃìôôôô√ôôffƒôô33≈ôôΔffˇˇ«ffÃûffôô…ffff ff33ÀffÃ33ˇˇÕ33ÃÃŒ33ôôœ33ff–3333—33“ˇˇ”ÃÑôô’ff÷33◊ÿˇˇˇŸ˘`˘`˘`⁄Ú–Ú–Ú–€Ï@Ï@Ï@‹Â∞Â∞Â∞›fl fl fl fiÿêÿêÿêfl“““‡ÀpÀpÀp·ƒ‡ƒ‡ƒ‡‚æPæPæP„∑¿∑¿∑¿‰±0±0±0™†™†™†Ê§§§ÁùÄùÄùÄËñññÈê`ê`ê`Íâ–â–â–ÎÉ@É@É@Ï|∞|∞|∞Ìv v v ÓoêoêoêÔiiibpbpbpÒ[‡[‡[‡ÚUPUPUPÛN¿N¿N¿ÙH0H0H0ıA†A†A†ˆ;;;˜4Ä4Ä4į---˘'`'`'`˙ – – –˚@@@¸∞∞∞˝   ˛êêê¿6ávè'ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘2Á˘ˇ‰ˇ˘ˇ˛¸ˇ˚ˇÔˇˇ¯¸ˇ‹ˇ˝¸ˇË˝ˇfiˇˇÊKÊˇ˝ˇ„ˇ˙ˇ¸ˇ˛ˇÚˇ˚˛ˇ˛ˇ¯ˇ˛ˇfiˇˇ¸ˇ˛ˇËˇˇˇÛˇÓˇÊGÊˇflˇˇ˙ˇ¸ˇ˛ˇÚˇ˘ˇ˛ˇ¯ˇ˛ˇ›ˇ¸ˇ˛ˇËˇ˛ˇÛˇÓˇÊ†Ê¸ˇˇ˝˚ˇˇˇ˚ˇ˙ˇˇ˚ˇ˚ˇ˛¸ˇˇ˝ˇ˛ˇ˙ˇ˝ˇ˘ˇ˛ˇ˛ˇ˝˝ˇˇˇ˙ˇ˛˝ˇ˛˝ˇ¸ˇ˛ˇˇ˛¸ˇˇˇ˝ˇ˝ˇˇˇ˛ˇˇ˛ˇˇ˛˛ˇˇ˝ˇ˝˝ˇˇ˛ˇˇ˛˛ˇÒ∂Êˇ˛˛ˇ˛ˇˇˇˇˇˇˇ¸ˇˇ˚ˇ˚˝ˇˇˇˇ˛ˇˇˇ˘ˇ˝ˇ˘˝ˇ˝ ˇˇˇˇˇˇ˚ˇˇ˛ˇˇˇ˛ˇ¸˝ˇ˛ˇˇ˛ˇ˛ˇˇˇˇ˚˛ˇ˝ˇˇˇˇ˛ˇ˛ˇˇˇˇˇˇˇˇˇˇÓ¶Êˇ¸ˇ˛ˇˇˇˇˇ¸ˇ˝¸ˇ¸ˇ˚ˇ¸ˇ˛ˇ˛ˇˇˇ˛ˇ˝ˇ˝ˇ˘ˇ¸˝ˇˇˇ¸ˇ˛˝ˇ˛ˇˇˇ˛ˇ¸ˇ˝˝ˇ˛ˇ˛˚ˇˇ˚ˇˇ˛˚ˇ˚ˇ˝ˇˇˇˇˇˇ¸ˇˇˇ≤Êˇ¸ˇ˝ˇˇ˛ˇˇˇˇˆˇ˚ˇ˚ˇ¸ˇ˛ˇ˛ˇˇˇ˘ˇ˝ˇ˘ˇ¸ˇˇˇ˛ˇˇˇ˙ˇˇˇ˛ˇˇˇ˛ˇˇ˝ˇ˝ˇˇˇ˛ˇ˛ˇˇ¸ˇ˚ˇˇˇˇ˝ˇ˛ˇˇˇˇˇˇˇ˛ˇˇ˛ˇˇ˙ˇÒ†Á˛ˇ˛˛ˇ˝ˇ˛˙ˇ˝ˇ˙ˇ˙ˇ˝˛ˇ˛˛ˇ˛ˇ˛ˇˇˇˇ˚˛ˇˇ˘˛ˇ¸ˇˇˇ˝ˇ˝ˇ˝ˇˇˇ˛ˇˇˇ˝ˇ˝˛ˇ˝ˇˇˇ˝ˇ˙ˇ˝˛ˇˇˇ˝ˇ˛ˇ˝ˇˇ¸ˇˇˇ˝ˇ˛ˇ˙ˇ&›ˇ˝ˇ‰ˇ€ˇÌˇ˝ˇ◊ˇ–ˇ˝ˇ‰)›ˇ˛ˇˇ„ˇ›ˇÏˇ˛ˇˇ◊ˇ–ˇ˛ˇˇ‰‹˛ˇ•˛ˇ÷˛ˇ–˛ˇ‚ÅÅ˘DÊ˛ˇˆˇ¸ˇ˜˛ˇ¸ˇˇÓ˝ˇÊˇ˝˙ˇ¸ˇ˙¸ˇ˙ˇˆˇ˛ˇ¸ˇˇ˛¸ˇ˝ˇ…S¡ˇˇˆˇˇ¸ˇÓˇ˛ˇÁˇˇ¸ˇ˝ˇ˝ˇˇ˙ˇˇ˛ˇÚˇÏˇˇ¸ˇ˛ˇ˝ˇˇˇˇÀM¡ԡˆˇˇ˛ˇˇÓˇ˛ˇÊˇ¸ˇ˜ˇ˚ˇˇ˛ˇÚˇÏˇˇ˛ˇˇˇ˘ˇ˛ˇÀ両˛˛ˇˇ˝ˇˇˇ˙ˇˇˇˇ˛ˇ˝ˇˇ˜ˇˇ˝ˇˇ˛ˇˇ˛˝ˇ˝ˇ˛˝ˇ¸¸ˇ˛˝ˇ˚ˇˇ˛ˇ˝ˇˇ˝ˇ˛ˇˇ˝ˇ˝˝ˇ˝
  222. ˇˇˇˇˇ˝˛ˇˇˇˇÀ†Âˇˇˇˇ˝ˇˇˇ˛ˇˇˇ˚ˇˇˇˇ˛ˇˇˇˇˆˇˇˇˇˇˇ˝ˇˇˇˇ˛ˇ¸ˇ˛ˇˇ˛ˇ˚ˇ˝ˇ˛ˇˇˇˇˇˇˇˇ˛    ˇˇˇˇ¸
  223. ˇˇˇˇˇ¸ˇ˛ˇ…ò    ˇˇˇˇˇ˛ˇˇ˛ˇ¸ˇ¸ˇˇˇˇ˝ˇˇ˜ˇ˝ˇ˚ˇ˝ˇ˝ˇˇˇˇ˛ˇ¸ˇ˚ˇ˛ˇ¸ˇˇ˚ˇ˛ ˇˇˇˇˇ˛    ˇˇˇˇ¸
  224. ˇˇˇˇˇ¸ˇˇˇ °Âˇˇˇ˝ˇˇˇ˛˛ˇ¯ˇˇ˛ˇˇˇˇˇ˛ˇ˙ˇ˛ˇˇ˝ˇ˛˛ˇ˛ˇˇˇˇ˛ˇˇ˝ˇ˝ˇˇ˛ˇˇ˝ˇˇ˚ˇ˛ ˇˇˇˇˇ˛ˇˇ˛ˇˇ˚ˇˇ˛ˇ˛ˇ˝ˇˇˇˇÀñʸˇ¸ˇ˛ˇ˝ˇ˝ˇ˝˛ˇˇ˛ˇˇˇˇ˛ˇˇ¸˝ˇ˛˝ˇ˛ˇ˛˛ˇ˛ˇˇˇ˝ˇ˝˙ˇ˝ˇˇˇ˛ˇ˝˛ˇ˚ˇˇˇ˝ˇ˛ˇˇˇ˝ˇ˝˛ˇˇ˛ˇ˛˝ˇ˛ˇˇˇˇœ±ˇΔˇfiˇ˝ˇØ±ˇΔˇfiˇ˛ˇˇØÅ–˛ˇ≠ÅÅ˘‰ˇÒˇˇÙ˛ˇˇ“˛ˇÅ̉ˇˇıˇ˛ˇˇÂˇÓˇÅÏ¡ˇÒˇˆˇ¸ˇÂˇÓˇÅÏL¡ˇ˛¸ˇ¸ˇˇˇˇ˙ˇ˙˝ˇ˝ˇˇˇ¸ˇˇˇˇˇ˛ˇˇˇ˛˝ˇ˘ˇ˝ˇ˛ˇˇÅˆ\Êˇ˛ˇ˛ˇ˛ˇˇ˛ˇˇˇˇ˚ˇ˚ˇ˝ ˇˇˇˇˇ˛ˇˇˇˇˇˇ˛ˇ˜ ˇˇˇˇˇÅ˜Qʸˇ˛ˇ˛ˇˇ˛ˇˇ¸ˇ¸ˇ˚ˇ˝ ˇˇˇˇˇ˛    ˇˇˇˇ¸ˇˇ˜ˇˇˇˇÅÙVÁˇ¸ˇˇ˛ˇˇ˛ˇˇˇ˜ˇ˛˝ˇ˛ ˇˇˇˇˇ˛
  225. ˇˇˇˇˇ˚ˇ˜ˇˇˇˇ˛ˇÅ¯VÁˇˇ˛˛ˇ˝ˇ˝ˇ˛ˇ˝ˇ˙˛ˇ˝˛ˇ˛ˇˇˇˇˇ˝ˇ˛˝ˇˇ˝ˇ˛ˇˇ¸˚ˇˇˇ˛ˇˇÅ˙fiˇ¸ˇŸˇÈˇÅÂfiˇ¸ˇŸˇÈˇÅÂfl˛ˇ˛˛ˇ€˛ˇÅÕÅÅ˘Á˛ˇ¸ˇˇ˛˙ˇ˘ˇˇˇÅ≥&Êˇˇ¸ˇ˝ˇˇˇ˙ˇ˛ˇ˙ˇˇÅæÊˇˇ˛ˇˇ˙ˇ¯ˇ˝ˇÅ≥-Êˇˇˇˇ˙ˇ˛˝ˇˇˇ˝ˇ˛ˇˇˇˇˇ˝ˇÅ√2Êˇˇˇˇ˙ˇ˝ˇˇˇ˛ˇ˛ˇˇˇˇˇˇÅƒ/Êˇˇˇˇ˙ˇ˝ˇ¸ˇˇ˝ˇ ˇˇˇˇÅƒ/Êˇˇ˛ˇ˙ˇ˝ˇˇ˚ˇˇˇˇˇˇˇˇÅƒ2Á˛ˇˇ˛ˇˇ˛˛ˇ˛ˇ˝ˇ˛ˇˇˇˇ˙ˇˇˇÅ≈ÅÅ˘ÅÅ˘ÅÅ˘ÅÅ˘Ê˝ˇˇˇ◊˛ˇ˙ˇˇÅ“òÅ
  226. HH<QIJˇˇˇˇˇˇˇˇˇˇÃÃˇˇˇˇôôˇˇˇˇffˇˇˇˇ33ˇˇˇˇˇˇÃÃˇˇˇˇÃÃÃÃˇˇÃÃôô    ˇˇÃÃff
  227. ˇˇÃÃ33 ˇˇÃà ˇˇôôˇˇˇˇôôÃÃˇˇôôôôˇˇôôffˇˇôô33ˇˇôôˇˇffˇˇˇˇffÃÃˇˇffôôˇˇffffˇˇff33ˇˇffˇˇ33ˇˇˇˇ33ÃÃˇˇ33ôôˇˇ33ffˇˇ3333ˇˇ33ˇˇˇˇˇˇÃàˇˇôô!ˇˇff"ˇˇ33#ˇˇ$ÃÃˇˇˇˇ%ÃÃˇˇÃÃ&ÃÃˇˇôô'ÃÃˇˇff(ÃÃˇˇ33)ÃÃˇˇ*ÃÃÃÃˇˇ+ÃÃÃÃÃÃ,ÃÃÃÃôô-ÃÃÃÃff.ÃÃÃÃ33/ÃÃÃÃ0ÃÃôôˇˇ1ÃÃôôÃÃ2ÃÃôôôô3ÃÃôôff4ÃÃôô335ÃÃôô6ÃÃffˇˇ7ÃÃffÃÃ8ÃÃffôô9ÃÃffff:ÃÃff33;ÃÃff<ÃÃ33ˇˇ=ÃÃ33ÃÃ>ÃÃ33ôô?ÃÃ33ff@ÃÃ3333AÃÃ33BÃÃˇˇCÃÃÃÃDÃÃôôEÃÃffFÃÃ33GÃÃHôôˇˇˇˇIôôˇˇÃÃJôôˇˇôôKôôˇˇffLôôˇˇ33MôôˇˇNôôÃÃˇˇOôôÃÃÃÃPôôÃÃôôQôôÃÃffRôôÃÃ33SôôÃÃTôôôôˇˇUôôôôÃÃVôôôôôôWôôôôffXôôôô33YôôôôZôôffˇˇ[ôôffÃÃ\ôôffôô]ôôffff^ôôff33_ôôff`ôô33ˇˇaôô33ÃÃbôô33ôôcôô33ffdôô3333eôô33fôôˇˇgôôÃÃhôôôôiôôffjôô33kôôlffˇˇˇˇmffˇˇÃÃnffˇˇôôoffˇˇffpffˇˇ33qffˇˇrffÃÃˇˇsffÃÃÃÃtffÃÃôôuffÃÃffvffÃÃ33wffÃÃxffôôˇˇyffôôÃÃzffôôôô{ffôôff|ffôô33}ffôô~ffffˇˇffffÃÃÄffffôôÅffffffÇffff33ÉffffÑff33ˇˇÖff33ÃÃÜff33ôôáff33ffàff3333âff33äffˇˇãffÃÃåffôôçfffféff33èffê33ˇˇˇˇë33ˇˇÃÃí33ˇˇôôì33ˇˇffî33ˇˇ33ï33ˇˇñ33ÃÃˇˇó33ÃÃÃÃò33ÃÃôôô33ÃÃffö33ÃÃ33õ33ÃÃú33ôôˇˇù33ôôÃÃû33ôôôôü33ôôff†33ôô33°33ôô¢33ffˇˇ£33ffÃç33ffôô•33ffff¶33ff33ß33ff®3333ˇˇ©3333ÃÙ3333ôô´3333ff¨333333≠3333Æ33ˇˇØ33ÃÃ∞33ôô±33ff≤3333≥33¥ˇˇˇˇµˇˇÃÃ∂ˇˇôô∑ˇˇff∏ˇˇ33πˇˇ∫ÃÃˇˇªÃÃÃúÃÃôôΩÃÃffæÃÃ33øÃÿôôˇˇ¡ôôÃìôôôô√ôôffƒôô33≈ôôΔffˇˇ«ffÃûffôô…ffff ff33ÀffÃ33ˇˇÕ33ÃÃŒ33ôôœ33ff–3333—33“ˇˇ”ÃÑôô’ff÷33◊ÿˇˇˇŸ˘`˘`˘`⁄Ú–Ú–Ú–€Ï@Ï@Ï@‹Â∞Â∞Â∞›fl fl fl fiÿêÿêÿêfl“““‡ÀpÀpÀp·ƒ‡ƒ‡ƒ‡‚æPæPæP„∑¿∑¿∑¿‰±0±0±0™†™†™†Ê§§§ÁùÄùÄùÄËñññÈê`ê`ê`Íâ–â–â–ÎÉ@É@É@Ï|∞|∞|∞Ìv v v ÓoêoêoêÔiiibpbpbpÒ[‡[‡[‡ÚUPUPUPÛN¿N¿N¿ÙH0H0H0ıA†A†A†ˆ;;;˜4Ä4Ä4į---˘'`'`'`˙ – – –˚@@@¸∞∞∞˝   ˛êêê
  228. váÄè'%¡ˇ˛ˇÙˇˆˇÚˇ˛ˇ¸ˇˇÅ”#¡ˇ˛ˇÙˇˆˇÔˇˇ˝ˇ˝ˇÅ‘:¡ˇ˛ˇˇˇˇˇ˛ˇ˙ˇˇ˛ˇ˝ˇ˝ˇ¸ˇˇ¸ˇ˝ˇÅ‘:¡ˇ˛ˇˇˇˇ¸ˇˇ˝ˇˇˇˇ˝ˇˇ¯ˇ˝ˇ˝ˇÅ‘<¡ˇ˛
  229. ˇˇˇˇˇ˛ˇˇ˝ˇˇˇ˝ˇˇ¯ˇ˝ˇ˝ˇÅ‘@¡ˇ˛ˇˇˇ˝ˇˇˇˇˇˇˇˇˇ˛ˇˇ¸ˇˇˇ¸ˇˇÅ”5ʸˇ˛ˇ˙ˇ˝˝ˇˇˇˇˇ˛˛ˇ˛ˇ¸ˇˇ˝ˇ˛ˇˇÅ“ÅÅ˘ÅÅ˘ÅÅ˘ˇ:@ˇ ˇˇˇˇ@
  230. ˇ·ˇ‚7^
  231. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  232. (‡*1 )-c)6    )9About the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  233. °dONLNd\lhÅ(elIn orj`°dONLNd\Åh);der to print, your application does not need to check the r¶¿°dONLNd@\hÛ)˛esolutions available or set °dONLNd\hltÄ(qlthe r¢`°dONLNdahÄt◊)esolution. However @°dONLNdsh◊tô)W/, if your application does factor in possible r†°dONLNd¢hôtÂ)¬esolutions, it can °dONLNdµtlį(}l!obtain the best quality output fr@°dONLNd÷t˘Ä{)çom a printer choosing equal rM†°dONLNdÛt{ÄÊ)Çesolutions for the X and Ï@°dONLNd tÊÄÏ)kYj °dONLNdtÌÄÔ) °dONLNdÄlåx(âldirI °dONLNdÄyå)$ections. Some devices support X and M@°dONLNd5Äå#)§YÀ °dONLNd6Ä#å)) r °dONLNd8Ä*åv)esolutions that arEİdONLNdJÄvåÍ)Le not equal, but using this °dONLNdfålòë(ïl    type of r´†°dONLNdoåëò„)%esolution usually r˘°dONLNdÇå„òı)R@esults in a distortion of the printed image. For information on °dONLNd¬òl§˚(°l how to determine the available r‰ °dONLNd‚ò˚§6)èesolution or rÓİdONLNdò6§ó);esolutions for the currQ °dONLNdòò§÷)bently selected °dONLNd§l∞ä(≠lprintero¿°dONLNd§ä∞ü), see ¿°dONLNd#§ü∞Q)'“Determining the Resolution of the CurrÅ@°dONLNdJ§R∞∂)≥ent Printer” on page 1-‡°dONLNda§∑∞¡)e17‡°dONLNdc§¡∞Δ)
  234. . 
  235. µ*–¯4∂*–¯
  236. ·*ȯ4‚*ȯ ‚*‚˛
  237. ˇ·ˇ‚7^ˇˇ£‰ˇÆ°dONLNdfŒ*‡˚(‹*About the Printing Managerˇˇˇˇˇˇ⁄|(‹Ó1
  238. °dONLNdÅÒl˝Å(˙lIn orj`°dONLNdÜÒÅ˝
  239. ) der to print, your application fi≠ °dONLNdßÒ
  240. ˝‰)â2rst uses the Printing Manager to open the printer °dONLNdŸ˝l    á(ldriver‡°dONLNdfl˝á    å). Ó@°dONLNd·˝ã    ë)YÆ¿°dONLNd‚˝ë    ø)
  241. ou then pr°@°dONLNdÏ˝ø    “).epar2°dONLNd˝”    )Be the document for printing by formatting it as necessary for the °dONLNd2    lfi(lRpage size that the user has selected. When you print, you draw the document using .°dONLNdÑl!ß* QuickDraw rR`°dONLNdèß!);outines into the printing ,
  242. CourierR`°dONLNd©!F)ografPortR`°dONLNd±F!K)0. .°dONLNd¥'l3(0l"The Printing Manager gives you a  ø °dONLNd÷'3T)õprinting grafPort9İdONLNdÁ'U3‰)N when you open a document for ˇˇ’T.°dONLNd3l?–(<lprinting. The printing ˇˇ¸ˇ¸°dONLNd3–?)dgrafPortˇˇ’Tˇ¸°dONLNd$3?x)0 data type is a QuickDraw ˇˇ¸ˇÙ°dONLNd>3y?©)ygrafPortˇˇ’TˇÙ°dONLNdF3©?˜)0 with additional °dONLNdW?lKs(Hlfi°dONLNdY?sK)'elds that customize it for printing. (Yï°dONLNdÄ?Kú)ßou must check for the type of ï°dONLNdû?úKÃ)ÇgrafPortï°dONLNd¶?ÃKÊ)0 data °dONLNd¨KlWˆ(Tl type, because it may be a color °dONLNdÃKˆW&)ägrafPort°dONLNd‘K&Wr)0 data type.) The °dONLNdÂKrW¢)LTPPrPort°dONLNdÌK¢WÂ)0 data type defi°dONLNd¸KÂWı)Cnes °dONLNdWlc•(`lthe printing °dONLNdW•c’)9grafPort°dONLNdW’c€)0 rR`°dONLNdW€cÌ)ecor$¿°dONLNdWÌc¸)d.   $¿°dONLNd W¸c)  °dONLNd#ol{Ñ(xlTYPE°dONLNd,oê{¿)$TPPrPort°dONLNd7oΔ{Ã)6=°dONLNd9oÿ{)    ^TPrPort;°dONLNdH}êâ∫(ÜêTPrPort°dONLNdR}ΔâÃ)6=°dONLNdUãlóê(îlRECORD°dONLNd`ô~•fi+gPort: GrafPort;°dONLNdvôÍ•)l{°dONLNdwô• )grafPort°dONLNdô •n)0 to draw in }°dONLNdëß~≥fi(∞~gProcs: QDProcs;°dONLNdßßÍ≥⁄)l({drawing routines of the printer driver}°dONLNd‘µ~¡>(æ~ { more fields for internal use }°dONLNdı√lœÑ(ÃlEND;.°dONLNd˙€lÁr*Y@İdONLNd˚€rÁÂ)Vou print text and graphics by drawing into this port with QuickDraw calls, just as if °dONLNdQÁlÛê(lyou werÒ`°dONLNdXÁêÛÍ)$e drawing on the scrˇ¿°dONLNdlÁÍÛÀ)Z6een. (The printer driver installs its own versions of .°dONLNd¢Ûlˇ(¸lQuickDraw’s low-level drawing rR`°dONLNd¡ÛˇD)ôoutines in the R`°dONLNd–ÛDˇh)?gProcsR`°dONLNd÷Ûhˇq)$ fiR`°dONLNdŸÛqˇΔ)    eld of the printing R`°dONLNdÌÛΔˇˆ)UgrafPortR`°dONLNdıÛˆˇ¯)0 .°dONLNdˆˇl Û(ldata type, causing your higherü‡°dONLNdˇÛ fi)á7-level QuickDraw calls to drive the printer instead of °dONLNdK læ(ldrawing on the scrD¿°dONLNd] ø”)Seen. {¿°dONLNdb ”Ÿ)Y<@°dONLNdc Ÿ)ou should stor‡°dONLNdq §)@e your versions of QuickDraw rµ†°dONLNdè §‚)ãoutines in the .°dONLNdûl#ê( lgProcs°dONLNd§ê#ñ)$ fPİdONLNd¶ñ#») ield of the PİdONLNd≤»#Ê)2gPortPİdONLNd∑Ê#Ï) f!°dONLNdπÏ#) ield of the !°dONLNd≈#N)2grafPort!°dONLNdÕN#à)0 data type.)  °dONLNd‹)l5Q(2l1Once you have drawn the document in the printing °dONLNd)Q5Å)ÂgrafPort°dONLNd)Å5Ù)0, the printer driver takes .°dONLNd05lA(>loverö†°dONLNd45AQ)1, translating the QuickDraw calls for the printer¿°dONLNde5QAfi)“". The printer itself does nothing °dONLNdáAlMù(JlEexcept draw the document on a page, exactly as the printer driver dir`°dONLNdÃAûMº(Jû    ects it. 
  243. r*x¯4s*x¯ sls¯
  244. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd÷alr™(nlThe UsereİdONLNdfia¨r2)@’s Formatting Inputˇˇˇˇˇˇ®(n1
  245. °dONLNdÚxlÑ“(ÅlMThe user gives you the information on how to format and print a document—for °dONLNd    ?ÑlêÒ* Wexample, the dimensions of the page, the pages of the document that should be printed, °dONLNd    ñêlúfl* the number of copies—thrF¿°dONLNd    Æê‡ú.)tough two standard@°dONLNd    æê.úÔ)N-d dialog boxes: the style dialog box and the °dONLNd    Îúl®Ø(•ljob dialog box. ˇ*Í@ˇ ˇˇˇˇ@
  246. ˇ·ˇ‚7^
  247. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äAbout the Printing Manager
  248. ‡(‡1ù)-‡)7(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  249. °dONLNd\ähù(eäThe ª¿°dONLNd\ùh“) style dialogƒ†°dONLNd\“h‘)5 D†°dONLNd\’hÂ)boxÔİdONLNd\Âh¬)4 lets the user specify the dimensions of the paper ri°dONLNdH\√h)fiectangle and any °dONLNdYhät…(qäoptions that af"†°dONLNdhh t)@Jfect the image to be printed, which is the information you need to format °dONLNd≤täÄÃ(}äthe document. i¿°dONLNd¿tÃÄ“)BY*@°dONLNd¡t“Ä)Iour application can customize the style dialog box to ask for additional °dONLNd
  250. Ääå√(âäinformation. ;`°dONLNdăå‹):Figur °dONLNdÄ‹å)e 1-2´†°dONLNd!Äåƒ)/ shows a sample style dialog box for the LaserW—°dONLNdPăå)‘riter SC printerÒ °dONLNd`Äå )B. °dONLNdbåäòê(ïäY@İdONLNdcåêò)our application should pr<‡°dONLNd|åò)q:esent the style dialog box when the user chooses the Page °dONLNd∂òä§‹(°äSetup command frh¿°dONLNdΔò‹§.)Rom the File menu. 
  251. «Hÿ4»Hÿ"»H_
  252. ˇ·ˇ‚7^    °dONLNdˇˇ(≈ä
  253. Figure 1-2°dONLNdŸΩû“)BA0°dONLNd⁄Ω“»4) sample style dialog box 
  254. °dONLNdÙaämù(jäThe ª¿°dONLNd¯aùmfi)job dialog boxG °dONLNdaflm¥)B1 lets the user specify how to print the document x†°dONLNd7a¥m◊)’    this timeΩ`°dONLNd@a◊m)#, such as the °dONLNdNmäy˛(väWprint quality (whether high-quality or draft-quality), the type of paper feed (such as °dONLNd•xäÑfl* Npaper tray or manual), the range of pages to print, and the number of copies. á °dONLNdÛxflÑÂ(ÅflYG†°dONLNdÙxÂш)our °dONLNd¯Ñäê(çäYapplication can customize the job dialog box to ask for information beyond these topics. °dONLNdQêäú¢* FigurR¿°dONLNdVê¢ú∂)e 1-3@°dONLNd[ê∂úÉ)- shows a sample job dialog box for the LaserW©°dONLNdàêÉú≈)Õriter SC printer… °dONLNdòê≈ú )B. õİdONLNdöê ú–)Y\°dONLNdõê–ú·)our °dONLNdüúä®È(•äapplication should prç °dONLNd¥úÈ®)_Aesent the job dialog box when the user chooses the Print command °dONLNdı®ä¥ë(±äfrò‡°dONLNd˜®ë¥„)om the File menu. 
  255. ÿHÈ4ŸHÈ"ŸH_
  256. ˇ·ˇ‚7^    °dONLNdˇˇ(÷ä
  257. Figure 1-3°dONLNd
  258. ŒÃŸ“)BA0°dONLNd Œ“Ÿ.) sample job dialog box 
  259. mHs4mHr mäm
  260. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd#[älˆ(häThe Print RecorF°dONLNd2[ˆlú)ld and the Printing Loopˇˇˇˇˇˇ®(h1
  261. .°dONLNdJrä~û({äIn orR`°dONLNdOrû~X)+der to print a document, you need a print r$¿°dONLNdzrX~j)∫ecor˜ °dONLNd~ri~à)d. The .˜ °dONLNdÖrà~¿)print record,.ú`°dONLNdír¡~Â)9     of type ,
  262. Courierú`°dONLNdõrÂ~    )$TPrintú`°dONLNd°r    ~ )$ .°dONLNd¢~ääù(áä(see $ °dONLNdß~ûäæ)page 1-R‡°dONLNdÆ~æä») 30R‡°dONLNd∞~»ä)
  263. G) contains the Printing Manager version, information about the printer °dONLNd˜ääñ¿(ìä(such as its rC`°dONLNdä¡ñê)70esolution in dpi), the dimensions of the paper r⁄İdONLNd5äêñ›)œectangle, and the °dONLNdGñ䢶(üäspecifiÓ °dONLNdNñ¶¢õ)9cations the user made in the style and job dialog boxes. Z@°dONLNdáñú¢û)ˆ 
  264. ◊HI4ÿIIòÄ>†ËHHHˇˇˇˇˇˇ†Ë€çC ƒˇÄΔÄΔüΔˇ˚üΔˇÛòΔòΔòΔòœ˚ˇ‡ò–˙ˇ¯ò–˙ˇ¸ò–¿˚>ˇò–˚ˇéò–`˚oò–@˚'˝!ò‡¸˛ôÄcáÄÂÄ˚˘!ò0¸˛ôÄL@ÂÄ˚    %ò1„g<môõgè ‰ Ä„    %ò33åôôëò#2fqôúcú ‰ Ä30    (ò„3ôèò8faôòcòåÁ|Ä3`    (òÛôôò3~aôòcòÃÁ"Ä3¿    &ò˝˛ô ò3`aôòcÃÁ"Ä3Ä    )ò    ˛ôò3&baôcòÃ@Ë"Ä3¿    )ò„èò<a˛aèáÄË"Ä3`    ò”"Ä30    ò”úÄ„    ò–Ä˚    ò–Ä˚    ò“ˇÄÄ˚    ò–@˚'    ò“ˇÄ`˚o    ò–˚ˇé    ò–¿˚>    ò–˙ˇ¸    ò¯<ÔÌ˙ˇ¯    &ò‡˙√ò‡00¿˜ ¿``aÄÛ˚ˇ‡    !ò0˚Åôê00¿˜`‡`aÄÍ    (ò1„·„l<ÅôÄ0<y„Δ¿˘
  265. a``xÛ«çÄÏ    &ò2˛3 å~Aô¿0f0Δg¯    b``ÃaåŒÎ    &ò·Û33˛    ~Aò‡0f0Δf¯    ‰``ÃaåÃΠ   &ò33Û˛    ~Aòp0~0«Ê¯    g`¸aèÃΠ   &ò33˛    ~Aò00`0Δ¯˛`¿aå Π   &ò33 <Åô00b0Δ&¯˛`ƒaåLΠ   &òÛ·„ Ä‡><cΔ¯    ``|x0«åΠ   ò˚√ Ï˚ˇÄ    ò˚<ÔÏ`˚`    òœ@˚     òœÄ˚    òœÄ˚    ò¯<ÔÏÄ<˝¿    'ò¯√ò‡0˛`¯ «‡`aÄÛÄb˝¿    )ò˘Åôê0˛`¯f`aÄÛ
  266. Ä`<|8x¿    +ò˘    ÅôÄ0<><`¯
  267. f`xÛ«çÄı
  268. Ä`Ffdÿ    *ò˘    Aô¿0ffF`¯    g¿`ÃaåŒÙ
  269. Ä`>f`ÿ    *ò˘    Aò‡0ff>`¯    ¿``ÃaåÃÙ
  270. Ä`ff`¸¿    *ò˘    Aòp0~ff`¯˛`¸aèÃÙ
  271. Ä`ff`¿¿    *ò˘    Aò00`ff`¯˛`¿aå Ù
  272. Äbffdƒ¿    *ò˘    Åô00bff`¯    d``ƒaåLÙ
  273. Ä<>f8x¿    'ò˘    Ä‡><>>`¯    √¿|x0«åÙÄ˚    ò¯√¸ˆ ÏÄ˚    ò¯<¸FıÏÄ˚    òÚ<fl@˚     òœ`˚`    òœ˚ˇÄ     ò¯<–    ò¯ √0xÄ€    ò˘ÅÑpà ˛€    ò˘Ńx0à èÒfi    ò˘    A‰Ã0à ¸ôòfi    ò˘    AtÃ0øôòfi    ò˘ A<Ã0à ôü˛ô¯fi    ò˘AÃ0à ôòôôÄfi    ò˘ Šÿ0à ô˛ôàfi    ò˘Åx¿0xôûÒfi    ò¯√ˆÄ›    ò¯<ˆÄ›    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òÓ˝7¸ˇ‡Û˚pÄ    8ò‡ `å˚qIJ0¿<<I¸  ¯įΔĸqÄ`dê@    7ò0˛`Ä˚»˝@ 8ffJ¸  ¿ÄÃĸ…Ä`‰†`    <
  274. ò3lx¯Ò„Ãx¯˝
  275. ¡üèO ff2¸ ¡ò„¿Ãœè¯x|xp¡Ò∂|fc `    <
  276. ò3åÃÃb1åÃÃ˝
  277. ·Åôòüêff¸ ¡ôëÄÃΔåÃåÃû·ôΔfl`@`    <
  278. ò3 ÃÃaÒåÃÃ˝
  279. qÉÄüêff¸ Òò˘ÅįΔåÃ|ÃÇqôÜfx`@`    =
  280. ò3 ¸Ãc1åÃÃ˝ 9ÜÄüêff    Ä˝  ¿ÒôÅÄÃΔå˛Ã¸p9ôÜfpò`    =
  281. ò3 ¿Ãc1åÃÃ˝ åüêff
  282. @˝  ¡ôôÅÄÃΔå˛Ã¿8ôÜfx`§`    =
  283. ò3 ƒÃc1åÃÃ˝ ôòòO ff@˝  ¡ôôëÄÃΔå˛ÃƒòôôÜfla$`    =
  284. ò„ xÃ1ÃxÃ˝ qüè@ <<Ä˝ ˘ò¯‡¿¯√åÃ||xpqôÜffa@    òÓ0¿¯ ˆ ˘Ä    òÓ˜ˇ‡ˆåÛ     ò’xÛ    òΔ    òΔ    òÓ˛7˚ˇ‡Á    *ò˛ˇ¯˛ˇ¯¯0¿~~I˚!¯Äp˛ ``Ú    )ò˛ˇ¯˛¯@ `J˚ `Ä»˛ `Ò    ,ò˛ˇ¯˛¯@ `2˚ a„3¿¡ˇ|g√‡Ù    ,
  285. ò˛¯ˇ¸¯Ä|˚ c31Ä·˛ôå˛f`Ù    ,
  286. òfiˇ˘¯!¯Ä ˚ c31Äq˛ôå˛f`Ù    -
  287. òé˛:¯q¯Ä    Ä¸ cÒ·Ä9˛ôå˛f`Ù    -
  288. ò˝€x˘à¯Ä
  289. @¸ c1IJôå˛f`Ù    ,
  290. ò˝ÿ8˝»¯@ F@¸ c1Ä˝ôå˛f`Ù    -
  291. òé˝fl∏qH¯@ <ĸ a„0¿qôèffc‡Ù     
  292. ò鞸∏qH¯0¿¯ ı`Ù     
  293. òéÒ«∏qH¯˜ˇ‡ˆ`Ù    
  294. òéÔ˚∏qÄHfl¿Ù    
  295. òéÔ˚∏q@@H–    
  296. òéÔ˚∏q¸@H–    
  297. òéÎÎ∏q\H¯˛7fi    
  298. òéÎÎ∏q"H¯0¿~<Ifi    
  299. òéÎÎ∏qH¯@ `fJfi    
  300. òéÎÎ∏q"H¯@ `f2fi    
  301. ò˛ÎÎ∏\H¯Ä|ffi    
  302. òÆ‚#∏Q¸@H¯Äffi    
  303. ò˛˙Ø∏@@H¯Äf    Äfl    
  304. òÆ˙Ø∏QÄH¯Äf
  305. @fl    
  306. ò˛˙Ø∏H¯@ Ff@fl    
  307. òÆ˙Ø∏QH¯@ <<Äfl    
  308. ò˛˙Ø∏H¯0¿€    
  309. òÆ˙Ø∏QH¯⁄    
  310. ò˛¯è∏H–    
  311. ò˛ˇˇ∏H–    
  312. ò˛8ˇˇ»–    ò˛ˇ¯˛–    ò˛ˇ¯˛–    ò˛ˇ¯˛ˇ¯–    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    òΔ    üΔˇÛ    êΔ    ÄΔ    ƒˇ    ƒˇ    
  313. ËHD4ÈHCòÄ>wÁHHHˇˇˇˇˇˇwÁÌå;»≈ˇ˛ÄΔÄΔüΔˇ˙üΔˇÚòΔòΔòΔòœ˚ˇ‡ò–˙ˇ¯ò–˙ˇ¸–ò–¿˚>êò–˚ˇéêò–`˚oêò–@˚'ê!ò‡¸˛ôÄcáÄÂÄ˚ê!ò0¸˛ôÄL@ÂÄ˚ê%ò1„g<môõgè ‰ Ä0ê%ò33åôôëò#2fqôúcú ‰ Äò0ê(ò„3ôèò8faôòcòåÁ|Äô∂|xê(òÛôôò3~aôòcòÃÁ"ÄôΔf0ê&ò˝˛ô ò3`aôòcÃÁ"ÄÒÜf0ê)ò    ˛ôò3&baôcòÃ@Ë"ÄÅÜf0ê)ò„èò<a˛aèáÄË"ÄÅÜf0êò”"ÄÅÜf0êò”úÄÅÜfêò–Ä˚êò–Ä˚êò“ˇÄÄ˚êò–@˚'êò“ˇÄ`˚oêò–˚ˇéêò–¿˚>êò–˙ˇ¸êò–˙ˇ¯êòœ˚ˇ‡êòΔêòΔêòΔêòΔêòΔêòΔêòΔêò˚˝ˇ‡Ì˝ˇ‡˛˛ˇ˛Ùê%ò˚˝ Ì˝ ˛@˛˝˚ˇÄê%ò˚˝ Ì˝ ˛@˛˝`˚`ê%ò˚˝ Ì˝ ˛@˛˝@˚ ê%ò˚˝ Ì˝ ˛@˛˝Ä˚ê.ò˚˝ ˘˝¿¸˝ ˛@˛˝Ä˚ê9ò‡ ˛ >¸aÄxà 0˝˝ ~@˛˝Ä<˝¿ê8ò˝˛ 3¸Ä@ÃÃ˝˝ @˛˝Äb˝¿ê=ò„„d ˛ 3`û@ÃÃ6xˇå˝ x¿@˛˝
  314. Ä`<|8x¿ê=ò˛32d ˛ 3#332a? Ãà8˛Ã˝ ÿ@˛˝
  315. Ä`Ffdÿê=ò˛38 ˛ >338? ¸Ã 0Ãÿ˝ Ã@˛˝
  316. Ä`>f`ÿê=ò33? ˛ 033?? Ãà0Ãÿ˝ Ã@˛˝
  317. Ä`ff`¸¿ê=ò330 ˛ 0330? Ãà0Ãÿ˝ Ã@˛˝
  318. Ä`ff`¿¿ê=ò331&d ˛ 0331&`û@ÃÃ0˛Ã˝ ÿ@˛˝
  319. Äbffdƒ¿ê=ò·„„d ˛ 0`Ä@ÃÃ0xÃÃ˝ x¿@˛˝
  320. Ä<>f8x¿ê6ò˛˝ ˝˛aIJ 0¸˝ ˛@˛˝Ä˚ê5ò˛˝ ˝#˛˝¿¸˝ ˛@˛˝Ä˚ê)ò˚˝ ˝Ú˝ ˛@˛˝Ä˚ê%ò˚˝ Ì˝ ˛@˛˝@˚ ê%ò˚˝ Ì˝ ˛@˛˝`˚`ê%ò˚˝ Ì˝ ˛@˛˝˚ˇÄêò˚˝ˇ‡Ì˝ˇ‡˛˛ˇ˛ÙêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòÙ<Ú‰ê+ò‡˝p˚√˝<˝√˛0¿@ ˛¿¿ê,ò0˝»¸Åò˝b˝√˛@ ``˛˛¿ê1*ò1„·„`¿Òô≥áå<ÅòÒÒ∞`<8pÒÁè@ p„«ΔcΔáá¿ê1ò2˛3$Ä·ôôΔLÃ~Aôôô¿`Fd…ò√ÄÄy‰ffdf Ãÿê1*ò·Û33qôôÜ ¿~A˘ôôÄ`>p·ò√ÄÄ_cÊfcÊåÃÿê/ ò33Û9ôôÜ¿~AÅôô˘Ä`f8q¯√ÄÄN¸fœÃ¿ê/ ò33ôôÜ ~AÅôôÅÄ`f9Ä√ÄD¸f˛ ¿ê/ò33˛ôÜLL<ÅÅôôâÄbfLôà√Ä@ @¸f LL¿ê1*òÛ·„p˘ÉáåÅĢÒÄ<>8paè@ @cÊc„Êáá¿êò˜√Ĉ0¿Âêò˜<Ĉ‰êòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêòΔêüΔˇÚêêΔêÄΔê≈ˇ˛êˇº@ˇ ˇˇˇˇ@
  321. ˇ·ˇ‚7^
  322. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  323. (‡*1 )-c)8    )9About the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  324. °dONLNd\lhõ(el The print rÒ†°dONLNd \õh≠)/ecorf°dONLNd\Æh˝)d has several subrÚ`°dONLNd!\˝h)Oecorf¿°dONLNd%\hû) ds. The printer information subrÙİdONLNdE\ûh∞)éecorh‡°dONLNdI\±h›) d, of type ,
  325. Courier.°dONLNdThltñ(qlTPrInfo°dONLNd[hñt¨)* (see °dONLNdah¨tÕ)page 1-°dONLNdhhÕt◊)!31°dONLNdjh◊t⁄)
  326. :), gives you the information needed for page composition, .°dONLNd§tlÄ(}l'including the vertical and horizontal rá°dONLNdÀtÄÒ)®3esolution of the printer in dpi and the boundaries °dONLNd˛Älå£(âlof the page rΔ†°dONLNd Ä£åÃ)7Dectangle (which is determined in the style dialog box, discussed on E`°dONLNdOÄÕå‰(âÕpage .°dONLNdTålòu(ïl1-°dONLNdVåuòz)    6°dONLNdWåzòfi)). The printing job subrR`°dONLNdoåfiò)decor$¿°dONLNdsåò) d, of type $¿°dONLNd~åòA)-TPrJob$¿°dONLNdÑåAòW)$ (see $¿°dONLNdäåWòx)page 1-$¿°dONLNdëåxòÇ)!31$¿°dONLNdìåÇòÔ)
  327. ), gives you information .°dONLNd¨òl§E(°l4about a particular printing job; for instance, the fi∞†°dONLNd·òE§‚)Ÿ&rst and last pages to be printed, the °dONLNd§l∞È(≠lUnumber of copies, and the method of printing the Printing Manager will use. The user °dONLNd\∞lº$* -sets its contents using the job dialog box.  V¿°dONLNdâ∞%º')π 
  328. …*÷¯4 *’¯,Zapf Dingbats°dONLNdˇˇ(–Xs°dONLNdˇˇ+WúİdONLNdˇˇ)ARNING
  329. ˇ·ˇ‚7^
  330. °dONLNdã”lflr(‹lY@İdONLNdå”rflj)9our application should not change the data in the print rs@°dONLNd≈”jfl|)¯ecorÁ†°dONLNd…”|flò)d—be °dONLNdŒfllÎz(Ëlsurâ °dONLNd—flzΜ)e to use the standar'@°dONLNdÂfl–΢)V1d dialog boxes to set this information. The only °dONLNdÎl˜r(Ùlfiå¿°dONLNdÎr˜Ó)elds you may need to set dirP¿°dONLNd4ÎÔ˜)}ectly arâİdONLNd<Θà) e some containing optional °dONLNdW˜l    (l$information in the printing job subrp‡°dONLNd{˜    )ùecorÂ@°dONLNd˜û)d (for example, the pointer to °dONLNdûlô( l the idle pr⁄†°dONLNd©ô∑)-ocedurq‡°dONLNdØ∏≈)e). 1°dONLNd≥≈Z)"Attempting to set other values dir”‡°dONLNd’Zç)ïectly in the °dONLNd‚là(lprint rµ‡°dONLNdÈàö)ecor*@°dONLNdÌõø)d can prN¿°dONLNdıø)$oduce unexpected rİdONLNd4)Wesults. ä°dONLNdˇˇ)!s
  331. ≠°dONLNdˇˇ)  °dONLNd&!l-r(*lY@İdONLNd'!r-Å)=our application should contain a printing loop, which is wherÁ°dONLNdd!Å-Ë(*Åe all the printing needs °dONLNd}-l9t(6larE°dONLNd-u9‹)    e handled, including pr‡ °dONLNdñ-‹9Ù)g?esenting the job dialog box and determining the range of pages °dONLNd’9lE©(Blto be printed. ˇˇï(.°dONLNdÂKlWO*3In the printing loop, you open the Printing Managerk‡°dONLNdKOWâ)„, initialize a ˇ˛øx+X°dONLNd'KäW∫);grafPortˇˇï(+X°dONLNd/K∫W¯)0 data type for .°dONLNd>Wlcï(`l@the document (“open” the document), and calculate the bounding r˜@°dONLNd~Wïcı(`ïectangle for one page °dONLNdîclo“(llNof the document (“open” a page). Each page needs to be opened and closed befor™°dONLNd‚c“oÏ(l“e you °dONLNdËol{‚(xlRcan handle any subsequent page of the document, so that you can determine exactly °dONLNd:{lá%* &how much information of the document ficİdONLNda{&á®)∫ts on each page. When you arM°dONLNd}{®áº)Çe thro`°dONLNdÇ{ºáÏ)
  332. ough with °dONLNdåálì¿(êlKthe pages, you then close the document and close the Printing Manager beforÓ°dONLNd◊á¿ìÎ(ê¿
  333. e ending. °dONLNd·ìlür(úlY@İdONLNd‚ìrü    )"ou must always issue the closing rL†°dONLNdì    ü†)ó!outine that matches any opening rD¿°dONLNd%ì†ü’)óoutines (for .°dONLNd2ül´ñ(®l
  334. instance, °dONLNd<üñ´Ã)*    PrOpenDoc°dONLNdEüô·)6 and °dONLNdJü·´)
  335. PrCloseDoc°dONLNdTü´Ó)<2), even if the user has aborted printing or if an .°dONLNdÜ´l∑x(¥lerr@°dONLNdâ´y∑í)or is rS¿°dONLNdê´í∑)eturned by the open calls. °dONLNd¨Ωl…((Δl*An example of a printing loop is shown in w°dONLNd÷Ω)…W)Ω Listing 1-1@°dONLNd·ΩX…h)/ on ^ °dONLNdÂΩh…à)page 1-凰dONLNdÏΩà…í) 12凰dONLNdÓΩí…î)
  336. .
  337. Ô*ı¯4Ô*Ù¯ ÔlÔ¯
  338. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd›lÓ∏(Íl The Idle Pr¥∞°dONLNd˚›∏ÓË)Locedur¥°dONLNd›ËÓÔ)0eˇˇˇˇˇˇ®(Í1
  339. °dONLNdÙlr(˝lY@İdONLNdÙrÃ)ou can designate an G`°dONLNdÙÃ)Zidle procedure§¿°dONLNd&Ù,)B to be r İdONLNd.Ù-‹)%un whenever the Printing Manager has °dONLNdSl x(    ldirI °dONLNdVy Ì)ected output to the printer:`°dONLNdqÌ )t . It stops ṙ°dONLNd} v)+unning once the entirIİdONLNdíw ˆ)_e document has been sent to °dONLNdÆ l›(lthe printer and does not rw`°dONLNd» ›≠)q1un while the printer actually prints. The idle prù†°dONLNd˘ ≠À)–ocedur4‡°dONLNdˇ ÃÏ)e takes °dONLNd    l$≈(!lno parameters and r«°dONLNd    ≈$ı)Y eturns no rÁ°dONLNd    %ı$ï)0$esult; the Printing Manager simply r!¿°dONLNd    Iñ$◊)°uns it at every °dONLNd    Y$l0°(-l opportunity‡°dONLNd    d$°0¶)5. °dONLNd    g6lB˛(?l!Some applications use the idle prØ °dONLNd    à6˛B)íocedurF`°dONLNd    é6B9)e to prè°dONLNd    ï69B‚)'oduce a dialog box, such as the one in °dONLNd    ºBlNÑ(KlFigurR¿°dONLNd    ¡BÑNò)e 1-4@°dONLNd    ΔBòN«) , on the scrÜ¿°dONLNd    “B»N‡)0@een that informs the user that the document is printing and the °dONLNd
  340. NlZG(Wl-Command-period command will cancel printing. ˇ!Ü@ˇ ˇˇˇˇ@
  341. ˇ·ˇ‚7^
  342. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äUsing the Printing Manager
  343. ‡(‡1ù)-‡)9(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  344. gHw4gHw"gH_
  345. ˇ·ˇ‚7^    °dONLNdˇˇ(dä
  346. Figure 1-4°dONLNd\Ãg“)BA0°dONLNd\“g-) sample idle procedure
  347. °dONLNd–ä‹(Ÿä If you don’t designate a idle prû‡°dONLNd8–‹0)àocedur6 °dONLNd>–1‹Û).e, the Printing Manager uses its default idle °dONLNdl‹äËì(ÂäprG °dONLNdn‹îË≤)
  348. ocedurfi`°dONLNdt‹≤Ë)e. The printing job subr °dONLNdå‹Ë,)hecorvİdONLNdê‹,Ël)d of the print rÓ‡°dONLNd†‹lË~)@ecorc@°dONLNd§‹Ë)!d contains a pointer to the idle .°dONLNd≈ËäÙî(ÒäprR`°dONLNd«ËîÙ±)
  349. ocedur$¿°dONLNdÕ˱ْ)    e in the ,
  350. Courier$¿°dONLNd÷Ë’Ù )$    PIdleProc$¿°dONLNdflË Ù)6 fi$¿°dONLNd‚ËÙL)    eld.  For mor˜ °dONLNdÔËKÙÔ)7#e information about what to be awar…İdONLNdËÔÙ)§e of .°dONLNdÙä≠(˝äwhen cr¯†°dONLNdÙ≠Ô)#eating a idle prJ¿°dONLNd.Ù)Cocedur‚°dONLNd4Ù()e, see ˚‡°dONLNd;Ù(7)“W>İdONLNd=Ù7|)riting an Idle PrÒ°dONLNdNÙ|ö)Eocedurà@°dONLNdTÙõ’)e” on page 1-«Ä°dONLNdaÙ’fl):25«Ä°dONLNdcÙflÊ)
  351. .  GİdONLNdfÙÁÏ)  GİdONLNdhÙÏÓ) 
  352. H!4H!
  353. 2H:43H: 3H3
  354. ˇ·ˇ‚7^ˇˇ£‰ˇÆ°dONLNdjH1(-HUsing the Printing Managerˇˇˇˇˇˇ⁄|(- 1
  355. °dONLNdÖAäMê(JäY@İdONLNdÜAêM )Vou can use the Printing Manager to print documents, to display and alter the printing °dONLNd‹MäY9(Vä(dialog boxes, and to handle printing errÓ°dONLNdM9Yπ)Øors. The Printing Manager pri@°dONLNd M∫Y›)Åovides r‘¿°dONLNd(M›Y)#outines that °dONLNd5Yäe\(bä.give your application device-independent contr@°dONLNdcY]eø)”ol over the printing pr&`°dONLNdzYøe€)bocess. °dONLNdÇkäwL(tä+All printable documents must have a print r  °dONLNd≠kMw_)√ecorİdONLNd±k_wû)d. Each print rÆÄ°dONLNd¿kûw∞)?ecor"‡°dONLNdƒk±w·) d contains °dONLNdœwäÉ](Ää/information about page size, number of copies r!İdONLNd˛w^É)‘'equested, and the pages the user wants °dONLNd%Éäè (åäprinted, among other things. ±¿°dONLNdBÉ è)ÅYr@°dONLNdCÉèP)ou should stor7‡°dONLNdQÉQèá)@e this print rpİdONLNd_Éáèô)6ecor‰‡°dONLNdcÉôè)d with the document so °dONLNdzèäõ¸(òäthat you can save the userÎİdONLNdîè˝õ)s’s pr6‡°dONLNdôèõ!)efer„°dONLNdùè!õ>)ences. °dONLNd•°ä≠ê(™äTµ¿°dONLNd¶°è≠…)o print a userY‡°dONLNd¥°À≠ )<’s document, fi§‡°dONLNd√° ≠")Arst crà°dONLNd…°"≠À)'eate or validate the document’s print r˙ °dONLNd°À≠›)©ecornİdONLNdÙ°fi≠) d. Then you °dONLNd≠äπ‹(∂äMshould have a printing loop that handles printing and checks for printing errH¿°dONLNdM≠›π(∂›ors at every °dONLNdZπä≈£(¬ästep.  °dONLNdbÀä◊ê*Y@İdONLNdcÀê◊‚)Mou should never assume what type of printer has been selected; that is, your °dONLNd∞◊ä„§(‡äAapplication should always be able to print to any type of printerÛ‡°dONLNdÒ◊£„®(‡£. °dONLNdÙÈäıê(ÚäTµ¿°dONLNdıÈèı)o use the Printing Manager,@°dONLNdÈı>)x , you must fiü@°dONLNdÈ>ı®)7rst initialize QuickDraw_ °dONLNd4È®ı˚)j, the Font Manager)İdONLNdFÈ˚ı)S, the °dONLNdLıäî(˛äWÛ`°dONLNdMıìŸ)    indow ManagerͰdONLNdZıŸ2)F, the Menu Manager≥`°dONLNdlı2=)Y, TÈ °dONLNdoı<Ã)
  356. extEdit, and the Dialog Manager1¿°dONLNdéıÃÍ)ê. The fiz@°dONLNdñı͘)rst .°dONLNdöäfl(
  357. äPrinting Manager rR`°dONLNd¨fl&)Uoutine to call is R`°dONLNdæ&J)GPrOpenR`°dONLNdƒJy)$ ; the last r$¿°dONLNd–y¿)/outine to call is $¿°dONLNd‚¿Í)GPrClose$¿°dONLNdÈÍÌ)*.
  358. 3H944H9 4ä4
  359. ˇ·ˇ‚7^ˇˇ◊.ˇ◊°dONLNdÎ!ä2õ(.äCrè °dONLNdÌ!õ2|) eating and Using the Print Recorˆ °dONLNd!|2Ö)·dˇˇˇˇˇˇ®)í1
  360. °dONLNd8äDü(AäIn orj`°dONLNd8üDu)1der to print a document, you need a valid print r˘‡°dONLNdE8uDá)÷ecorn@°dONLNdI8àD¸)d that is formatted for the °dONLNdeDäPú(MäcurrذdONLNdiDúP†);ent versions of the Printing Manager and the printer driver•†°dONLNd§D†P‘(M†. The print r@°dONLNd±D’PÁ)5ecorㆰdONLNdµDÁP)d has °dONLNdªPä\_(Yä1information such as the vertical and horizontal rá°dONLNdÏP_\ˆ)’%esolution of the printer in dpi, the °dONLNd\ähı(eäboundaries of the page r†°dONLNd)\ˆh )l?ectangle, the number of copies, and the method of printing the °dONLNdhhätµ(qä
  361. user has rS¿°dONLNdrhµtfl)+    equested.°dONLNd|zäÜê(ÉäTµ¿°dONLNd}zèÜü)o cr‡Ä°dONLNdÅzüÜÏ)eate a new print r^°dONLNdìzÌܡ)Necor“`°dONLNdózˇÜ<)d, you must fia °dONLNd•z=ÜS)>rst crà`°dONLNd´zSÜÛ)$eate a handle to it with the Memory .°dONLNdœÜäí⁄(èäManager function °dONLNd‡Ü⁄í)P    NewHandle°dONLNdÈÜí)6. R`°dONLNdÎÜí)Yg`°dONLNdÏÜí\)ou then must fig`°dONLNd˚Ü\í)All the fig`°dONLNdÜíµ)#elds of the r9¿°dONLNdܵí«)6ecor  °dONLNdÜ«íË)d with °dONLNdíäû†(õäapprR`°dONLNd í†û2)!opriate values; for example, use R`°dONLNdAí2ûz)í PrintDefaultR`°dONLNdMízûØ)H to set the fiR`°dONLNd[íØû)5elds to the default .°dONLNdoûä™∫(ßä values storV@°dONLNdzû∫™)0ed in the printer driver¿°dONLNdíû™$)e. 
  362. wäπ4wäπòÄ*]HHHdˇˇˇˇˇˇ]Hzå∂aÿˇÄ⁄Ä⁄ü⁄ˇ˘ü⁄ˇ˘ò⁄ò⁄ò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò>¿0|``Äêò3˛$f˛`Äêò36œè3·6fc«√ƒp<Ò„dÄêò38ÃΔ3306fdff`»3c3âÔêò>0ÃΔ330fcÊf`‡3c3Óê    ò00ÃΔ330˛fg‡p?cÛÓê    ò00ÃΔ330˝f80cÓê    ò00ÃΔ330˝f ò1cÓêò00Ã√31|cÊc¿p 1„Óê ò˙0‚ê ò˚0‚ê ò˚‡‚êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄ê#ò~˚00˛åcÄ˝Ä¿˙ê#ò˚00˛åîÅÄ˝Ä¿˙ê+$òx0·„Ò„3>œáÄîÅòÒòÅÊg√¿<˛ê*
  363. òà ëôô30˛3˝3åÿ±ôòôôÄΔff`F˛ê*
  364. òà ôò30˛3˝3åÿ·ôòôôÄΔff`>˛ê*
  365. òà ôò?0˛3˝3圿¡˘òôôÄΔfg‡f˛ê*
  366. òà ôò00˛3˝3åÃîÅ·ÅòôôÄΔfff˛ê+òà ˛ô13˛33323åÃ@îűâòôôÄΔff f˛ê+$òxôé31„Ò„¸3ëÄcò¯ôèÄcÁ√¿>˛êò˘¸f˚êò˘Ò˝f˚êòÁ˝¿˚êò⁄êò⁄êò⁄ê ò˙ @„êò˝¿¿@ „êò˚¿¿0„ê    ò>6«á¿¿0„ê    ò338Ãÿ¿0„ê    ò330Ãÿ¿0„ê    ò3?0Ãÿ¿0„ê    ò300Ãÿ¿0„ê    ò310ÃÿΔ3„ê    ò>0«á¿F#„êò0¸ @„ê    ò0‹êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êò⁄êü⁄ˇ˘êü⁄ˇ˘êÄ⁄êÄ⁄êÿˇêˇ ˙@ˇ ˇˇˇˇ@
  367. ˇ·ˇ‚7^
  368. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  369. (‡*1 )-c)10    )9Using the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  370. Courier
  371. .°dONLNd\lhÜ(el/prRecHdl := THPrint(NewHandle(SIZEOF(TPrint)));°dONLNd0jlvˆ*PrintDefault(prRecHdl);.°dONLNdHÇlér*Y@İdONLNdIÇréÚ)ou can use an existing print r6†°dONLNdgÇÚé)Äecor´°dONLNdkÇéÁ)4d (for instance, one saved with a document). If you .°dONLNdüélöÃ(óluse an existing print rR`°dONLNd∂éÃöfi)`ecor$¿°dONLNd∫éfiö)    d, be sur˜ °dONLNd√éö9)#e to call the ˜ °dONLNd—é9öu)8
  372. PrValidate˜ °dONLNd€éuö¥)< function befor…İdONLNdÍé¥öÊ)? e using the .°dONLNdˆöl¶à(£lprint rµ‡°dONLNd˝öà¶ö)ecor*@°dONLNdöõ¶◊)d to make sur≥¿°dONLNdö◊¶9)<e it’s valid for the curráİdONLNd'ö9¶Ï)b(ent version of the Printing Manager and °dONLNdO¶l≤ù(Øl for the currH`°dONLNd[¶û≤˝)2ently installed printer|@°dONLNdr¶˝≤)_. °dONLNdu∏lƒr(¡lY@İdONLNdv∏rƒ„)ou should save the print r `°dONLNdê∏‰ƒˆ)recorÄ¿°dONLNdî∏ˆƒ·)4d when the user closes the document. This saves any °dONLNd»ƒl–u(ÕlprG °dONLNd ƒv–Ü)
  373. eferÛ@°dONLNdŒƒÜ–Ó)Tences that the user has selected for printing that document, such as orientation of °dONLNd"–l‹Õ(Ÿlthe page or page size. °dONLNd:‚lÓ™*Many of the fiâ@°dONLNdH‚™Óˆ)>elds in the print r·°dONLNd[‚ˆÓ)LecorU`°dONLNd_‚    Ó)d ar∂ °dONLNdc‚Ó%)e rƒ¿°dONLNdf‚%Óx) eserved for use by ï`°dONLNdy‚xÓ»)SApple and they ar±Ä°dONLNdä‚»Óı)P e likely to °dONLNdñÓl˙”(˜lchange without notice. K°dONLNd≠Ó”˙r)g%Also, every printer driver uses the fi#†°dONLNd”Ós˙ø)†elds of the print rã°dONLNdÊÓø˙—)Lecorˇ`°dONLNdÍÓ—˙Ÿ)d °dONLNdÏ˙lx(ldif™`°dONLNdÔ˙xÑ) fer凰dONLNdÚ˙Ñö) entlyΔ°dONLNd˜˙ô≥). In or∞`°dONLNd˛˙≥¨)7der to maintain compatibility with the Printing Managerâ`°dONLNd5˙¨¬)˘, ther+¿°dONLNd;˙√”)e ar:`°dONLNd?˙”Ù)e some °dONLNdFl(lguidelines you should follow:,Zapf Dingbats°dONLNddl"q*n
  374. °dONLNdfx$I) .Do not test for the contents of undocumented fi¬†°dONLNdïI$])—elds.°dONLNdõ-l4q(3ln
  375. °dONLNdù*x6≠) Do not set fi¿°dONLNd™*Æ6˙)6elds in the print riİdONLNdΩ*˙6 )Lecor›‡°dONLNd¡* 6!)d dirB¿°dONLNdΔ*"66)ectly¿°dONLNdÀ*668).°dONLNdÕ?lFq(Eln
  376. °dONLNdœ<xH~) Y@İdONLNd–<~HR)1ou should use the existing print dialog boxes, or`°dONLNd<RH‚)‘!, if you want to customize them, °dONLNd"HxTÕ(Qxalter them only as rÿ¿°dONLNd6HÕT)Uecommended in ܰdONLNdDHTÊ)J/“Altering the Style or Job Dialog Box” on page °dONLNdsTx`Ä(]x1-”‡°dONLNduTÄ`ä)23”‡°dONLNdwTä`å)
  377. .
  378. Ö*ã¯4Ü*㯠Ülܯ
  379. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNdytlÖ˝(ÅlPrinting a Documentˇˇˇˇˇˇ®(Å1
  380. °dONLNdçãlóD(îl2The printing loop calls all the Printing Manager r`°dONLNdøãEóÚ)Ÿ'outines necessary to print a document. °dONLNdÊól£
  381. (†l#The general printing loop shown in ¿°dONLNd    ó £9)ü Listing 1-1 °dONLNdó:£d)/  is an extrê`°dONLNdód£ä)*emely br;¿°dONLNd'óã£ÿ)'oad example of a °dONLNd8£lØ„(¨lUprinting loop—for example, the code does not optimize for the type of  printer being °dONLNdçØlªè* Dused nor for the material being printed (text, graphics, or a mixtur!İdONLNd—ØêªË(∏êe of both). However•‡°dONLNd‰ØÁªÙ)W, it °dONLNdȪl«Ë(ƒlWdoes cover the major aspects of what is needed in a printing loop: the balance of open °dONLNd@«l”<* /and close calls, determining page count, and pr
  382. @°dONLNdo«=”È)—%oviding support for documents longer .°dONLNdî”lfl{(‹l8than the maximum named by the Printing Manager constant °dONLNdÔ{fl±(‹{    iPFMaxPgs°dONLNd’”±fl∂)6. °dONLNdÿÂlÒa(Ól9The printing loop starts by getting a pointer to the currR`°dONLNdÂaÒq)ıent R`°dONLNdÂqÒ°)grafPortR`°dONLNd°ÒÈ)0. Then it calls a °dONLNd/Òl˝p(˙lrR`°dONLNd0Òp˝ë)outine, R`°dONLNd8Òë˝Ò)!MyUnloadTheWorldR`°dONLNdHÒÒ˝è)`$, that swaps out code segments not r$¿°dONLNdlÒè˝¶)ûequir˜ °dONLNdqÒ•˝—)
  383. ed during .°dONLNd{˝l    »(lprinting. (The specifi∑İdONLNdë˝»    ı)\ cs of this r¨@°dONLNdù˝ı    )-    outine ar3†°dONLNd¶˝     )(*e left up to the individual application.) Ë °dONLNd–˝…    È)¨At this °dONLNdÿ    l (l$point, it opens the Printing Managera`°dONLNd¸     M)†, printer driver*`°dONLNd     Mä)A, and printer r↰dONLNd    ä¢)=esour—‡°dONLNd     ¢≥)ce fiòİdONLNd%    ¥Ï)le for use by .°dONLNd3l!é(lcalling °dONLNd;é!≤)"PrOpen°dONLNdA≤!µ)$..°dONLNdC'l3€(0lThe loop saves the driverÔ °dONLNd\'‹3È)p’s r8`°dONLNd`'Í3)esourưdONLNde'3)ce fiG@°dONLNdj'3{)le so that if your idle prπ¿°dONLNdÑ'{3ô)gocedurQ°dONLNdä'ö3◊)e changes the °dONLNdò3l?o(<lrE°dONLNdô3p?à)esourç@°dONLNdû3à?fl)ce chain in any wayß °dONLNd±3fi?^)V , the driver does not lose its rê °dONLNd—3^?v)Äesourÿ`°dONLNd÷3v?ù)
  384. ces. (See ˆ °dONLNd‡3ù?¨)'“W8¿°dONLNd‚3¨?Á)riting an Idle .°dONLNdÒ?lKv(HlPrR`°dONLNdÛ?vKì)
  385. ocedur$¿°dONLNd˘?ìKÃ)e” on page 1-$¿°dONLNd    ?ÃK÷)925$¿°dONLNd    ?÷KÛ)
  386. .) The $¿°dONLNd    ?ÛK;) PrintDefault$¿°dONLNd    ?;KG)H pr˜ °dONLNd    ?FKc) ocedur…İdONLNd    $?cKq)e fi…İdONLNd    (?qKÆ)lls the print rõ‡°dONLNd    7?ÆK¿)=ecorn@°dONLNd    ;?¿KÛ) d with the .°dONLNd    FKlW…(Tldefault values specifiı†°dONLNd    \K…W)]ed by the curr~ °dONLNd    jKWÔ)>5ent printer driver; the user may change these values °dONLNd    üWlc
  387. (`l%with the style and job dialog boxes. °dONLNd    ≈iluÅ*In orj`°dONLNd     iÅuΩ)Hder to print the document, you must divide the data into sections that fiñ`°dONLNd
  388. iΩuÚ(rΩt within the °dONLNd
  389.  ulÅá(~lpage r‡°dONLNd
  390. &uàÅØ)Dectangle dimensions set by the user in the style dialog box and stor°dONLNd
  391. juØÅ◊(~Ø
  392. ed in the .°dONLNd
  393. tÅlçä(älrPage°dONLNd
  394. yÅäçê) fPİdONLNd
  395. {Åêç˚)ield of the printing job r"‡°dONLNd
  396. ïÅ˚ç)kecorı@°dONLNd
  397. ôÅ ç+)d. The ı@°dONLNd
  398. †Å+ç©)MyDetermineNumOfPagesı@°dONLNd
  399. µÅ©çÙ)~ function must be .°dONLNd
  400. «çlôà(ñlspecifiÓ °dONLNd
  401. ŒçàôÒ)Rc to the application, because the way the application divides up the data depends °dONLNd  ôl•G(¢l2on the type of text and graphics in the document. ˇ ä@ˇ ˇˇˇˇ@
  402. ˇ·ˇ‚7^
  403. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äUsing the Printing Manager
  404. ~¿(‡1‡)-a¿)11(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  405. °dONLNd\ähì(eä;After determining the number of pages, the printing loop pr7 °dONLNd;\îh(eîesents the user with the job °dONLNdXhät„(qädialog box. The user`°dONLNdlhÂtÚ)[’s rY†°dONLNdphÚt*) esponses herǰdONLNd|h*t;)8e pr›†°dONLNdÄh;t),ovide information such as the number of the °dONLNd¨täÄ/(}ä$copies and the page numbers of the fi› °dONLNd—t/ÄÇ)•rst and last pages r‡°dONLNdÂtÉÄÍ)Tequested. The loop stor‰@°dONLNd¸tÈÄ)f    es these ˇˇ‡Ë.°dONLNdÄäå(âä"values in local variables such as ,
  406. Courierˇˇ¢∏≈p°dONLNd'ÄåS)ì    firstPageˇˇ‡Ë≈p°dONLNd0ÄSåg)6 and ˇˇ¢∏á@°dONLNd5Ähåò)lastPageˇˇ‡Ëá@°dONLNd=Äòå¡)0 . It then r¸X°dONLNdHÄ¡å))esets the values of .°dONLNd\åäò†(ïäthe fiÍ °dONLNdbå†òE)(rst and last pages in the printing job r2†°dONLNdäåFòX)¶ecorß°dONLNdéåXòÙ)$d as 1 and 9999 (using the constant .°dONLNd≤òä§∫(°äiPrPgMax°dONLNd∫ò∫§√)0). .°dONLNdæ™ä∂’(≥äThe loop comparí °dONLNdÕ™’∂)KHes the values of the number of pages in the document with the last page °dONLNd∂ä¬≥(øä
  407. the user r"¿°dONLNd∂¥¬%)*equested. If the user has rİdONLNd:∂%¬ )q5equested the printing loop to print page 50 of a two-°dONLNdo¬äŒ$(Àä"page document, the printing loop rFİdONLNdë¬%Œ¯)õ3esets the value of the last page to 2. This avoids °dONLNdƒŒä⁄Ω(◊ä printing errª°dONLNd–ŒΩ⁄()3ors later on in the loop.  °dONLNdχäÏ'(Èä%At this point, the loop begins the pre°dONLNd‡'϶)ùocess of sending the pages of%`°dONLNd.‡ßÏ    )Äf to be printed. It puts °dONLNdGÏä¯(ıä up the dialog box of the idle pr!İdONLNdgϯ1)âocedur∏¿°dONLNdmÏ1¯O)e and r4İdONLNdtÏP¯e)estor∏°dONLNdyÏe¯Ω)es the printer driverfl¿°dONLNdéÏæ¯À)Y’s r)°dONLNdíÏï‰)esourq@°dONLNdóω¯ )
  408. ce chain. °dONLNd¢˛ä
  409. Δ(äKOnce in the page loop, the printing loop checks to see if the size of the fi' °dONLNdÓ˛«
  410. ‰(«le is grR†°dONLNdˆ˛‰
  411. ) eater than .°dONLNd
  412. ä“(äHthe maximum number of pages that can be printed (given by the constant  °dONLNdI
  413. “(“    iPFMaxPgs°dONLNdR
  414. )6). °dONLNdUä"√(äFIf the user has chosen immediate printing, your application can print °dONLNdõ√"˘(√    iPFMaxPgs°dONLNd§˘"˚)6 .°dONLNd•"ä.˝(+äTnumber of pages and then begin the printing loop again with the next section of the °dONLNd˘.ä:8* 'document. If the user has chosen deferr¢ °dONLNd .8:ï)Æed printing and the fiòİdONLNd6.ñ:µ)^    le is lar@°dONLNd?.∂:›)     ger than .°dONLNdH:äF¿(Cä    iPFMaxPgs°dONLNdQ:¿Fä)6., the loop closes the document and sends the fPİdONLNd:äF˙) irst 128 pages to a spool f!°dONLNdö:˙F)pile to .°dONLNd°FäRº(Oä be printed. ˘‡°dONLNd≠FºR¬)2Y∫`°dONLNdÆF¬RÊ)Aou then must go back and print the next portion of the document. ú@°dONLNdÔFÊRÏ(OÊY\¿°dONLNdFÏR )ou can .°dONLNd˜Rä^„([äprint any number of °dONLNd R„^)Y    iPFMaxPgs°dONLNdR^D)6
  415.  pages, prR`°dONLNdRD^)+*ovided you only send that many at any one .°dONLNdH^äj¢(gätime. .°dONLNdOpä|€*KThe loop then opens a page for printing and draws the page in the printing °dONLNdöp€| (y€grafPort°dONLNd¢p |)0 ˇˇ.X°dONLNd£|äà≥(Öä    with the ˇ˝ã‹∞°dONLNd¨|≥àı)) MyDrawStuffˇˇ.X‹∞°dONLNd∑|ıà)B pr›h°dONLNd∫|à) ocedurØ»°dONLNd¿|àå)e, the details of which ari‡°dONLNd⁄|çà±)pe specifiò8°dONLNd„|±à)$c to the application. In ˇˇß‘°dONLNd¸àäî~(ëä8this loop, the parameters contain the size of the page r‡®°dONLNd4à~î∫)Ùectangle, the ˇ˛˜|0P°dONLNdBàªîÎ)=grafPortˇˇß‘0P°dONLNdJàÎî)0  selected, .°dONLNdUî䆡(ùäTand the page number to be printed. The application can use the same code to print a °dONLNd©†ä¨è* :page of a document as it uses to draw the same page on scrz°dONLNd„†è¨£(©èeen. °dONLNdÈ≤äæ›(ªäWhen the loop is fi—`°dONLNd¸≤›æ)SHnished printing, it closes the document. If the user has selected spool .°dONLNdDæä Ï(«äprinting, you call the °dONLNd[æÏ ")b    PrPicFile°dONLNddæ" .)6 prR`°dONLNdgæ. K) ocedur$¿°dONLNdmæK ¬)e, which sends the spool fi$¿°dONLNdàæ¬  )wle to the printer .°dONLNdö ä÷•(”ädriver‡°dONLNd† •÷ã). The printing loop then closes the Printing Manager†°dONLNd‘ ã÷ì)Ê, rfl†°dONLNd◊ ì÷)eports any Printing Manager .°dONLNdÛ÷ä‚ó(fläerrR`°dONLNdˆ÷ó‚¿)
  416. ors, and r$¿°dONLNd    ÷¿‚Í))
  417. esets the $¿°dONLNd    
  418. ÷Í‚)*grafPort$¿°dONLNd    ÷‚ )0 r˜ °dONLNd    ÷‚1)ecor…İdONLNd    ÷1‚ï)d to the original port. .°dONLNd    1ËäÙ@(Òä+At the end of the printing loop, all open r| °dONLNd    \Ë@Ùÿ)∂"outines to the Printing Manager ar©°dONLNd    ~ËÿÙ    )ò e balanced °dONLNd    âÙäΩ(˝ä with close rl‡°dONLNd    ïÙΩ)3outines. This is extr"¿°dONLNd    ™Ù)V9emely important to do, even if you stop printing because °dONLNd    „ä Ø(    ä    of an errú°dONLNd    ÏØ ∏)%orF¿°dONLNd    Ó∏ ◊)    . Failurr¿°dONLNd    ˆ◊ ˇ)Ee to call the matching close calls can cause the Printing Manager to °dONLNd
  419. ; äÀ(äperform incorr•İdONLNd
  420. I Àfl)Aectly}İdONLNd
  421. N fl·)..°dONLNd
  422. Pä*('ä!Note that every section of the prR`°dONLNd
  423. q*;)îocedur$¿°dONLNd
  424. w;*Z)e calls $¿°dONLNd
  425. Z*Ñ)PrError$¿°dONLNd
  426. ÜÑ*)* after each Printing Manager °dONLNd
  427. £*ä6é(3ärR`°dONLNd
  428. §*é6”)outine. If an err$¿°dONLNd
  429. µ*”6j)E%or is found, the loop calls a close r˜ °dONLNd
  430. ⁄*i6ƒ)ñoutine (for instance, ˜ °dONLNd
  431. *ƒ6Ó)[PrClose˜ °dONLNd
  432. ˜*Ó6˚)* or °dONLNd
  433. ˚6äBΔ(?ä
  434. PrCloseDoc°dONLNd 6ΔBZ)<!) for any Printing Manager open rR`°dONLNd &6ZBÄ)î    outines (R`°dONLNd /6ÄB§)&PrOpenR`°dONLNd 56§B±)$ or R`°dONLNd 96±BÁ)    PrOpenDocR`°dONLNd B6ÁB)6) befor$¿°dONLNd I6B )e .°dONLNd KBäN¸(Käalerting the user of the err5†°dONLNd gB˝N)sor‡`°dONLNd iBN
  435. ). ≤¿°dONLNd kB
  436. N)Ys@°dONLNd lBNx)ou should use this apprè °dONLNd ÉBxN)h oach in your own application to °dONLNd £NäZ≤(Wämake sur5‡°dONLNd ´N≥ZB)) e the Printing Manager closes pr    °dONLNd ÀNBZË)è$operly and all temporary memory is rëİdONLNd ÔNËZ)¶    eleased. ˇ »@ˇ ˇˇˇˇ@
  437. ˇ·ˇ‚7^
  438. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  439. (‡*1 )-c)12    )9Using the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  440. g*j¯4g*j¯"g*a
  441. ˇ·ˇ‚7^    °dONLNdˇˇ(dl Listing 1-1°dONLNd\∞g∂)DA0°dONLNd\∂g˝) sample print loop,
  442. Courier
  443. .°dONLNds*Œ(|*F{ Below is a general print loop.  The code makes no assumption about }°dONLNd[Å*çº*C{ what printer is being used nor does it take advantage of what's }°dONLNdüè*õ∂*B{ being printed; text, graphics, whatever.  Depending on how you }°dONLNd‚ù*©¬*D{ implement your own print loop for your application, you can make }°dONLNd'´*∑∞*A{ it robust with print status dialogs and idle procs or simpler }°dONLNdiπ*≈∂*B{ without them.  You must remember to balance the open and close }°dONLNd¨«*”∂*B{ calls to the Printing Manager.  Failure to do so can cause the }°dONLNdÔ’*·>*.{ Printing Manager to not perform correctly. }°dONLNdÒ*˝Æ*PROCEDURE MyPrintLoop;°dONLNd7*<*VAR°dONLNd<6'`+ copies:°dONLNdI¢'“)lInteger;°dONLNdS)65r(26
  444. firstPage:°dONLNdc)¢5“)lInteger;°dONLNdm76Cl(@6    lastPage:°dONLNd|7¢C“)lInteger;°dONLNdÜE6Qê(N6numberOfCopies:°dONLNdõE¢Q“)lInteger;°dONLNd•S6_x(\6 pageNumber:°dONLNd∂S¢_“)lInteger;°dONLNd¿a6mÑ(j6printResFile:°dONLNd”a¢m“)lInteger;°dONLNd›o6{x(x6 printError:°dONLNdÓo¢{“)lInteger;°dONLNd¯}6âä(Ü6numberOfPages:°dONLNd }¢â“)lInteger;°dONLNdã6óf(î6oldPort:°dONLNd$ã¢ó“)lGrafPtr;°dONLNd.ô6•r(¢6
  445. theStatus:°dONLNd>ô¢•fi)l
  446. TPrStatus;°dONLNdKµ*¡H(æ*BEGIN°dONLNdR√6œú+ GetPort(oldPort);°dONLNdgfl6Î⁄*F{MyUnloadTheWorld is your routine to swap out unneeded segments that }°dONLNdØÌ6˘‘*E{ are not required during print time.  Your print code must be in a }°dONLNdˆ˚6Ï*I{ separate code segment.  You need to do this for memory considerations.}°dONLNdC6#ú*MyUnLoadTheWorld;°dONLNdX36?`*PrOpen;°dONLNdaA6MÃ*IF (PrError = noErr) THEN°dONLNd|O6[T*BEGIN°dONLNdÑ]Hiò+8{Save the current resource file so the driver will not }°dONLNdøkHwn*1{ lose its resources upon return from pIdleProc.}°dONLNdˆáHìÍ*printResFile := CurResFile;°dONLNd£HØÿ*PrintDefault(gPrintRec);°dONLNd2±HΩfi*IF (PrError = noErr) THENˇ @ˇ ˇˇˇˇ@
  447. ˇ·ˇ‚7^
  448. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äUsing the Printing Manager
  449. ~¿(‡1‡)-a¿)13(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿,
  450. Courier
  451. .°dONLNd\fhÑ(efBEGIN°dONLNd    jxv»+8{MyDetermineNumOfPages is your routine that determines }°dONLNdExxÑ∞*4{ the number of pages contained in the document by }°dONLNd}Üxíº*6{ comparing the size of the document with rPage, the }°dONLNd∑îx†º*6{ printable area for the currently selected printer. }°dONLNdÒ¢xÆ»*8{ It returns the number of pages required to print the }°dONLNd-∞xºŒ*9{ document.  This routine is specific to the individual }°dONLNdjæx “*{ application.}°dONLNdÇ⁄xÊ˛*AnumberOfPages := MyDetermineNumOfPages(gPrintRec^^.prInfo.rPage);°dONLNdÀˆx8* IF (PrJobDialog(gPrintRec)) THEN°dONLNdÔxñ*BEGIN°dONLNd˘ä™+0{Get the number of copies along with the first }°dONLNd. ä,™*0{ and last pages of the document that the user }°dONLNdc.ä:§*/{ wants printed.  Also, pretend you are going }°dONLNdó<äHJ* { to print the entire document.}°dONLNdΩXädí*,numberOfCopies := gPrintRec^^.prJob.iCopies;°dONLNdÓfärz*(firstPage := gPrintRec^^.prJob.iFstPage;°dONLNdtäÄt*'lastPage := gPrintRec^^.prJob.iLstPage;°dONLNdGÇäéJ* gPrintRec^^.prJob.iFstPage := 1;°dONLNdlêäút*'gPrintRec^^.prJob.iLstPage := iPrPgMax;°dONLNdù¨ä∏∞*1{Determine the "real" number of pages contained }°dONLNd”∫äΔ∞*1{ in the document. Without this test, you could }°dONLNd    »ä‘∂*2{ print up to iPrPgMax pages, or at least try to.}°dONLNd?‰fr(Ìf  °dONLNdC‰ä¯)$=IF (numberOfPages < lastPage) THEN lastPage := numberOfPages;°dONLNdää ¬*4{Install and call your "Print Status Dialog" here. }°dONLNd√äÍ*{ For example: }°dONLNdÿä(Ê*:{ printStatusDlg := GetNewDialog(257, NIL, pointer(-1)); }°dONLNd*ä6‡*9{ gPrintRec^^.prJob.pIdleProc := @checkMyPrintDlgButton;}°dONLNd[FäRò*-{Print the number of copies of the document }°dONLNdçTä`º*3{ requested by the user from the print job dialog.}°dONLNd pä|b*$FOR copies := 1 TO numberOfCopies DO°dONLNdÛ~ää®*BEGIN°dONLNd˛åúò™+-{Restore the printer driver's resource file.}°dONLNd1öú¶2*UseResFile(printResFile);ˇ
  452. Ú@ˇ ˇˇˇˇ@
  453. ˇ·ˇ‚7^
  454. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  455. (‡*1 )-c)14    )9Using the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  456. Courier
  457. .°dONLNd\~hÄ(e~+{Print the range of pages of the document }°dONLNd1j~vå*-{ requested by the user from the job dialog.}°dONLNdjÜ~íz**FOR pageNumber := firstPage TO lastPage DO°dONLNdöî~†ú*BEGIN°dONLNd¶¢êÆÏ+:{Check for max size of spool file.  If it is larger than }°dONLNdÁ∞꺬*3{ a multiple of 128, then close the doc, initiate }°dONLNd!æê º*2{ printing, and reopen the doc.  Notice that the }°dONLNdZÃêÿ⁄*7{ IF statement is always true the first time through, }°dONLNdò⁄êÊå**{ thus ensuring the doc is always opened.}°dONLNd—ˆêº*2IF (pageNumber - firstPage) MOD iPFMaxPgs = 0 THEN°dONLNd
  458. êÆ*BEGIN°dONLNd¢\+IF pageNumber <> firstPage THEN°dONLNd> ¢,¿*BEGIN°dONLNdL.¥:J+PrCloseDoc(gPrinterPort);°dONLNdn<¥H⁄*1IF (gPrintRec^^.prJob.bJDocLoop = bSpoolLoop) AND°dONLNd©JΔVJ+(PrError = noErr) THEN°dONLNd…XΔd‡*/PrPicFile(gPrintRec, NIL, NIL, NIL, theStatus);°dONLNdf¢r∫(o¢END;°dONLNd t¢Äº*/gPrinterPort := PrOpenDoc(gPrintRec, NIL, NIL);°dONLNdBÇêé®(ãêEND;°dONLNdMêêú&*IF (PrError = noErr) THEN°dONLNdmûê™Æ*BEGIN°dONLNdz¨¢∏V+PrOpenPage(gPrinterPort, NIL);°dONLNd†∫¢Δ8*IF (PrError = noErr) THEN°dONLNd¡»¢‘∂*.{The rPage field of the prInfo record is the }°dONLNd˜÷¢‚∞*-{ printable area for the currently selected }°dONLNd,‰¢º*/{ printer. If you send the current port, your }°dONLNdcÚ¢˛û**{ app can use the same routine to draw to}°dONLNdï¢ û**{ the screen and the printer's GrafPort. }°dONLNdœ¢(Ü*&MyDrawStuff (gPrintRec^^.prInfo.rPage,°dONLNd*Í6º+H#GrafPtr(gPrinterPort), pageNumber);°dONLNd,8¢D>(A¢PrClosePage(gPrinterPort);°dONLNdMFêR®(OêEND;°dONLNdWT~`ñ(]~END;°dONLNdab~n*PrCloseDoc(gPrinterPort);°dONLNdÄp~|§*1IF (gPrintRec^^.prJob.bJDocLoop = bSpoolLoop) AND°dONLNd∏~êä+(PrError = noErr) THEN°dONLNd’åêò™*/PrPicFile(gPrintRec, NIL, NIL, NIL, theStatus);°dONLNd    öl¶Ñ(£lEND;°dONLNd®Z¥r(±ZEND;ˇ*@ˇ ˇˇˇˇ@
  459. ˇ·ˇ‚7^
  460. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äUsing the Printing Manager
  461. ~¿(‡1‡)-a¿)15(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿,
  462. Courier
  463. .°dONLNd\fh~(efEND;°dONLNdjTvl(sTEND;°dONLNdÜTíû*7{Get the error before PrClose or the error disappears.}°dONLNdI¢TÆÿ*printError := PrError;°dONLNda∞TºÑ*PrClose;°dONLNdmÃTÿ¯*F{You do not want to report any printing errors until you have fallen }°dONLNdµ⁄TÊ*H{ through the printing loop. This will make sure that ALL of the Print }°dONLNdˇËTÙ¯*F{ Manager's open calls have their corresponding close calls, thereby }°dONLNdGˆT˛*G{ enabling the Print Manager to close properly and that all temporary }°dONLNdêT&*#{ memory allocations are released.}°dONLNdµ H,∂()H=   IF (printError <> noErr) THEN DoError(ePrint, printError);°dONLNdÙ.T:∫+ SetPort(oldPort);°dONLNd<HH`(EHEND;
  464. hHo4iHo jäj
  465. ˇ·ˇ‚7^ .°dONLNd [äi√+B  Printing Fr3@°dONLNd[ƒi):om the Finderˇˇˇˇˇˇ(e1
  466. °dONLNd$oä{ê(xäTµ¿°dONLNd%oè{Ì)o print a document frÔ°dONLNd:oÌ{+)^om the Findery`°dONLNdGo+{    )>3, the user selects the document’s icon and chooses °dONLNdz{äáÈ(Ñäthe Print command friİdONLNdé{Èá)_?om the File menu. When the Print command is chosen, the Finder °dONLNdÕáäì (êäZstarts up the application and passes information to it indicating that the document is to °dONLNd'ìäü<* (be printed rather than opened on the scr]¿°dONLNdOì<üP)≤een. î¿°dONLNdTìPüV)YU@°dONLNdUìVüÒ)#our application should then do the °dONLNdxüä´√(®äfollowing, prˆ†°dONLNdÖü√´7)9eferably without going thrᇰdONLNdüü8´r)uough its entirWİdONLNd≠üs´«);e startup sequence:°dONLNd¬±åΩì(∫å1..°dONLNd≈±ñΩø)
  467.     Call the °dONLNdŒ±øΩ)) PrJobDialog°dONLNdŸ±Ωe)B function, described on °dONLNdÒ±eΩÜ)dpage 1-°dONLNd¯±ÜΩê)!43°dONLNd˙±êΩ˝)
  468. . If the user selected morR`°dONLNd±˝Ω)me °dONLNdΩñ…3(Δñ#than one document, you can use the °dONLNd9Ω3…o)ù
  469. PrJobMerge°dONLNdCΩo…”)< function, described on °dONLNd[Ω”…Ù)dpage 1-°dONLNdbΩÙ…˛)!46°dONLNddΩ˛…)
  470. , to .°dONLNdi…ñ’Δ(“ñ apply the rû °dONLNdt…Δ’®)05esults of one job dialog box to all of the documents.°dONLNd´€åÁì(‰å2.°dONLNdÆ€ñÁ/)
  471. !Print the document or documents. °dONLNd–Ìä˘^(ˆä.Most applications open the document on the scrûİdONLNd˛Ì^˘¥)‘een while printing. °@°dONLNdÌ¥˘)VAlthough this is not °dONLNd'˘ä¥(ä    necessary4‡°dONLNd0˘¥)*, it is helpful to the user¶ °dONLNdK˘ )g. .°dONLNdN äë(äYï°dONLNdO ê„)ou can also print frg`°dONLNdc „O)Som the Finder using the g`°dONLNd{ Og)lpDocg`°dONLNd gi)     °dONLNdÄ i)%Apple event. See the chapter “Finder .°dONLNd•ä#”( äInterface” in the S`°dONLNd¡‘#)JOperating Systeṁ°dONLNd—#N)I  volume of ‡ °dONLNd‹O#î)2Inside Macintosh¬ °dONLNdÏï#∏)F for mor冰dONLNdÙπ#)$e information about °dONLNd#ä/À(,ähow to print fr_İdONLNd#À/    )Aom the Finderȇ°dONLNd$#/)=.   
  472. MHT4NHT OäO
  473. ˇ·ˇ‚7^ °dONLNd)@äNq(Jä)Printing Each Page as a Separate Documentˇˇˇˇˇˇ(J1
  474. °dONLNdSTä`ı(]äRSome applications use a method of printing that prints out each page of a spooled °dONLNd•`äl0* &document as a separate print job in or7`°dONLNdÀ`1lm)ßder to avoid rE¿°dONLNdŸ`ml˜)<unning out of disk space while °dONLNd¯läx(uäspooling the document to disk. Õ@°dONLNdlx)ãYç¿°dONLNdlx)7ou should not use this method, known as “spool a page, °dONLNdOxäÑp(Åä6print a page,” because it only works for a printer dir¡†°dONLNdÖxpÑÂ)Êectly connected to the userÚİdONLNd†xÊÑÔ)v’s °dONLNd£ÑäêB(çä(computer (and not to a network) and therR¿°dONLNdÀÑBêS)∏efor™¿°dONLNdœÑSêb)e cr)†°dONLNd”Ñcê)%eates device dependence, and because °dONLNd¯êäú™(ôä    it’s extr(†°dONLNdê´ú›)!
  475. emely slowé@°dONLNd ê‹ú0)1. If the printer is a r5İdONLNd"ê1úm)Uemote or sharê °dONLNd/êmúÈ)<ed device (such as a LaserW†°dONLNdJêÈú˛)|riter °dONLNdPúä®È(•äprinter or an ImageW¥Ä°dONLNddúÈ®\)_riter printer connected by ›¿°dONLNdú\®})sAppleTë°dONLNdÖú}®)! alk), another application could °dONLNd•®ä¥c(±ä/print a document between the pages of your usert‡°dONLNd‘®d¥ü)⁄’s document. T¿°dONLNd·®ü¥Í);At worst, if both °dONLNdÛ¥ä¿(Ωä!applications printing to the shar@°dONLNd    ¥¿)é8ed printer use the “spool a page, print a page” method, ˇ @ˇ ˇˇˇˇ@
  476. ˇ·ˇ‚7^
  477. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  478. (‡*1 )-c)16    )9Using the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  479. °dONLNd\lhÁ(elSthe printed documents could end up interleaved. The pages for one of the documents °dONLNdShlt∫* could be out of orÖ °dONLNdeh∫t»)Nderü¿°dONLNdhh»tK), even when printed by itself. 
  480. í*ô¯4ì*ô¯ îlî¯
  481. ˇ·ˇ‚7^ °dONLNdàÖlì•(èl Printing Fr3@°dONLNdìÖ¶ì8):om the Low-Level Interfaceˇˇˇˇˇˇ(èÚ1
  482. °dONLNdÆôl• (¢l'The low-level interface is the set of rÔ°dONLNd’ô •ª)ü'outines that use the Device Manager dirZ °dONLNd¸ôº•fi)±    ectly to °dONLNd•l±!(Æl*print. Some printer drivers converts the r¬Ä°dONLNd/•!±fl)µ.outines in the low-level interface into their °dONLNd]±lΩˆ(∫lZequivalents in the high-level interface, so you won’t gain a speed advantage by using the °dONLNd∑Ωl…õ* low-level rÿ°dONLNd¬Ωõ…))/!outines. In fact, your code may rô°dONLNd„Ω*…V)è    un slower‚@°dONLNdÏΩU…‚)+". The low-level interface is used °dONLNd…l’‹(“lprimarily on the ImageWı¿°dONLNd%…€’ñ)o-riter printer for printing text and graphics.°dONLNdS€lÁû(‰lGIf you want to use the low-level interface, you should use the code in /‡°dONLNdö€üÁÕ(‰ü Listing 1-2– °dONLNd•€ÕÁÚ).
  483. , so that °dONLNdØÁlÛË(lthe Printing Manager can pr9`°dONLNd ÁÈÛÛ)}@operly convert the low-level calls to the high-level interface. 
  484. *¯4*¯"*a
  485. ˇ·ˇ‚7^    °dONLNdˇˇ(l Listing 1-2°dONLNd  ∞^)D-Printing a page using the low-level interface,
  486. Courier
  487. .°dONLNd9"l.Æ(+l PrDrvrOpen;°dONLNdL"Δ.b)Z{opens the printer driver}°dONLNdg0l<‘(9l<PrCtlCall(iPrDevCtl, lPrDocOpen, 0, 0); {opens the document}°dONLNd§>lJ¬*9PrCtlCall(iPrDevCtl, lPrPageOpen, 0, 0); {opens the page}°dONLNd„LêXt+$&{Here you send the data to be printed}°dONLNd
  488. ZlfŒ(cl;PrCtlCall(iPrDevCtl, lPrPageClose, 0, 0); {closes the page}°dONLNdFhlt‡*>PrCtlCall(iPrDevCtl, lPrDocClose, 0, 0); {closes the document}°dONLNdÖvlÇ¥* PrDrvrClose;°dONLNdôvΔÇh)Z{closes the printer driver}.°dONLNdµélöÉ(ólThe rÄ¿°dONLNd∫éÉö)%outines in the low-level interface ar5`°dONLNdfléök)úe documented in ÿ °dONLNdÔéköˆ)L“Low-Level Routines” on page °dONLNd öl¶t(£l1-”‡°dONLNdöt¶~)56”‡°dONLNdö~¶ì)
  489.  and ¡°dONLNdö)“Low-Level Contr °dONLNd%ö¶;)Qol Calls” on page 1-ò@°dONLNd9ö;¶E)V58ò@°dONLNd;öE¶J)
  490. . 
  491. Ã*“¯4Ã*—¯ Ãlï
  492. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd>∫lÀ(«lChecking for PrGeneralˇˇˇˇˇˇ®(«1
  493. .°dONLNdU—l›Ä(⁄lThe °dONLNdY—Ä›∂)    PrGeneral°dONLNdb—∂›¬)6 prR`°dONLNde—¬›fl) ocedur$¿°dONLNdk—fl›#)e (described on $¿°dONLNd{—#›∏)D “Optimizing Printing” on page 1-$¿°dONLNdõ—∏›¬)ï51$¿°dONLNdù—¬›È)
  494.     ) allows .°dONLNd¶›lÈŒ(Êlyou to determine the r!`°dONLNdº›œÈ4)cesolution of the printer °dONLNd‘›4È\)e , set the rİdONLNdfl›\Ⱥ)(esolution you want, fia°dONLNdı›ºÈÙ)`nd out if the °dONLNdÈlı)(Úl,user has selected landscape printing, or forfi °dONLNd/È)ıò)Ωce draft-quality printing. _ °dONLNdJÈôıü)pY†°dONLNdKÈüıœ) ou call the .°dONLNdWıl¢(˛l    PrGeneral°dONLNd`ı¢Æ)6 prR`°dONLNdcıÆÀ) ocedur$¿°dONLNdiıÀ )e with one of fı@°dONLNdxı
  495. C)?ive opcodes: ı@°dONLNdÖıCã)9 GetRslDataOpı@°dONLNdëıãê)H, ı@°dONLNdìıê¿)SetRslOpı@°dONLNdõı¿≈)0, °dONLNdùl¢(
  496. l    GetRotnOp°dONLNd¶¢ß)6, °dONLNd®ßÈ) DraftBitsOp°dONLNd≥È˘)B, or °dONLNd∏˘G)NoDraftBitsOp°dONLNd≈Gfl)N". Four of these opcodes have data ˇˇM°dONLNdÁlx(lstrl°dONLNdÍxé) uctur>`°dONLNdÔé)es associated with them. (The fiø∫°dONLNd/)éfth, ˇ˝Á6 ðdONLNd0~)NoDraftBitsOpˇˇM ðdONLNd!~≠)N, serves to rΔb°dONLNd.≠Â)/everse the ef2ʰdONLNd;ʯ)9fect °dONLNd@l%â("lof the °dONLNdGâ%À) DraftBitsOp°dONLNdRÀ%í)B- opcode and so does not have its own data strl°dONLNdí%®)«uctur>`°dONLNdÑ®%∂)e.) °dONLNdâ+l7?(4l-Not all printer drivers have implemented the °dONLNd∂+?7u)”    PrGeneral°dONLNdø+u7Å)6 prR`°dONLNd¬+Å7û) ocedur$¿°dONLNd»+û7Õ)    e howeverg`°dONLNd—+Ã7Ú).
  497. , so your .°dONLNd€7lC$(@l+code can’t depend on being able to use it. °dONLNdIlUö* Listing 1-3 @°dONLNdIõU^)/+ shows how to check to see whether the curro°dONLNd=I^Uæ)√ent printer driver has .°dONLNdTUlaº(^limplemented the °dONLNddUºaÚ)P    PrGeneral°dONLNdmUÚa˛)6 prR`°dONLNdpU˛a) ocedur$¿°dONLNdvUa0)e. In $¿°dONLNd|U0a`) Listing 1-3$¿°dONLNdáU`aà)0
  498. , the curr˜ °dONLNdëUáaÀ)'ent printing err…İdONLNd°UÀaÔ)D
  499. or is set °dONLNd´almw(jlto °dONLNdÆawm}) 0°dONLNdØa}mä) or °dONLNd≥aäm®)noErr¬†°dONLNd∏aßmË). The opcode fi¬†°dONLNd«aËmg)Aeld of the page orientation rï°dONLNd‰agmy)ecorg`°dONLNdËaymú)d (type g`°dONLNdaúmfi)# TGetRotnBlkg`°dONLNd˚afimÓ)B) is °dONLNd    mlyò(vl set to the °dONLNd     mòyŒ),    getRotnOp°dONLNd    mŒyÔ)6A opcode, which is the opcode to determine if the user has chosen .°dONLNd    UylÖ?(Çl/landscape orientation. The code passes the addr—İdONLNd    Ñy?Öπ)”ess of the page orientation r˚@°dONLNd    °yπÖÀ)zecoro†°dONLNd    •yÃÖ)    d to the .°dONLNd    ÆÖlë¢(él    PrGeneral°dONLNd    ∑Ö¢ëÆ)6 prR`°dONLNd    ∫ÖÆëÀ) ocedur$¿°dONLNd    ¿ÖÀë.)e. The code then calls $¿°dONLNd    ◊Ö.ëL)cPrErr$¿°dONLNd    ‹ÖLëâ) to get any err˜ °dONLNd    ÎÖàë≤)<
  500. ors that r…İdONLNd    ıÖ≤ë“)*esult frõ‡°dONLNd    ˝Ö“ë·) om °dONLNd
  501. ëlùé(ölcalling °dONLNd
  502. ëéùƒ)"    PrGeneral°dONLNd
  503. ëƒùÚ)6 . If the errR`°dONLNd
  504. ëÚù).or is R`°dONLNd
  505. #ëù=)    opNotImplR`°dONLNd
  506. ,ë=ùœ)6", the printer driver does support °dONLNd
  507. Nùl©¢(¶l    PrGeneral°dONLNd
  508. Wù¢©Y)6+ but not that particular opcode. If the errR`°dONLNd
  509. ÇùY©n)∑or is R`°dONLNd
  510. àùn©∞) resNotFoundR`°dONLNd
  511. ìù∞©È)B, the printer °dONLNd
  512. °©lµ’(≤ldriver does not support °dONLNd
  513. π©’µ )i    PrGeneral°dONLNd
  514. ¬© µ¢)6$.  The code then sets the function rR`°dONLNd
  515. Ê©¢µÀ)ó
  516. esult to Fï°dONLNd
  517. © µÔ)(    ALSE.    ˇh@ˇ ˇˇˇˇ@
  518. ˇ·ˇ‚7^
  519. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äUsing the Printing Manager
  520. ~¿(‡1‡)-a¿)17(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  521. gHj4gHj"gHa
  522. ˇ·ˇ‚7^    °dONLNdˇˇ(dä Listing 1-3°dONLNd\Œgf)D$Checking for the PrGeneral procedure,
  523. Courier
  524. .°dONLNd%sH&(|H%FUNCTION DoIsPrGeneralThere: Boolean;°dONLNdLèHõZ*VAR°dONLNdQùT©ê+ 
  525. getRotRec:°dONLNd\ùê©ÿ)< TGetRotnBlk;°dONLNdj´T∑ñ(¥T myPrintErr:°dONLNdv´ñ∑∫)BOsErr;°dONLNd«H”f(–HBEGIN°dONLNdÜ’T·¥+ myPrintErr := 0;°dONLNdò„TÔ*getRotRec.iOpCode := getRotnOp;°dONLNdπÒT˝*getRotRec.hPrint := myPrRecHdl;°dONLNd⁄ˇT ÿ*PrGeneral(@getRotRec);°dONLNdÚTÿ*myPrintErr := PrError;°dONLNd
  526. T'¿*PrSetError(noErr);°dONLNd)T5û*7IF (myPrintErr = noErr) THEN DoIsPrGeneralThere := TRUE°dONLNdW7TCl*ELSE°dONLNd^EfQ&+ IF (myPrintErr = OpNotImpl) THEN°dONLNdÅSf_å*1{ PrGeneral is supported but this opcode isn't. }°dONLNd∂axm+DoIsPrGeneralThere := TRUE°dONLNd”of{~(xfELSE°dONLNd€}xâD+"IF (myPrintErr = resNotFound) THEN°dONLNdãxó‡*<{ PrGeneral isn't supported by the current printer driver. }°dONLNdBôä•2+DoIsPrGeneralThere := FALSE;°dONLNd_ßH≥`(∞HEND;
  527. €H·4€H‡ €ä€
  528. ˇ·ˇ‚7^ˇˇ◊.ˇ◊°dONLNdd…ä⁄ö+B&&Determining the Resolution of the Currá`°dONLNdä…ö⁄„(÷ö ent Printerˇˇˇˇˇˇ®)t1
  529. °dONLNdñ‡äÏè(Èä;Some printer drivers support one of two possible kinds of r5İdONLNd—‡êÏ”(Èêesolution: discrâ °dONLNd·‡”ÏÓ)Cete or .°dONLNdËÏä¯∑(ıä
  530. variable. R`°dONLNdÚÏ∑¯æ)-Yg`°dONLNdÛÏΩ¯¸)ou can use the g`°dONLNdϸ¯2)?    PrGeneralg`°dONLNd Ï2¯>)6 pr9¿°dONLNdÏ>¯[) ocedur  °dONLNdÏ[¯f)e (  °dONLNdÏf¯á) page 1-  °dONLNdÏá¯ë)!51  °dONLNd Ïë¯)
  531. ) to determine the kind of .°dONLNd;¯äç(ärE°dONLNd<¯é)esolution supported by the curr†°dONLNd[¯¿)å'ent printer and then use the highest  rW`°dONLNdǯ¿)¶esolution desirÑ`°dONLNdë¯)Aed °dONLNdîä (äby the application or the user3İdONLNd≤ )Å. .°dONLNdµä"¡(äDEach printer has its own unique imaging capabilities. When you call °dONLNd˘¡"˜(¡    PrGeneral°dONLNd˜")6 with °dONLNd"ä.∏(+ä
  532. the value °dONLNd"∏.). GetRslDataOp°dONLNd".#)H     for the °dONLNd'"#.G)#opcode°dONLNd-"G.P)$ fi°dONLNd0"P.)    )eld of the parameter block, the Printing .°dONLNdY.ä:∏(7ä    Manager rW°dONLNdb.∏:Í). eturns the rİdONLNdn.Î:å)3&esolutions that the printer supports. 8@°dONLNdî.å:§)°Figur °dONLNdô.§:∏)e 1-5®Ä°dONLNdû.∏:˙) shows the get-.°dONLNd≠:äFé(CärR`°dONLNdÆ:éFΩ) esolution r$¿°dONLNdπ:ΩFœ)/ecor˜ °dONLNdΩ:ŒFı)    ds (type ˜ °dONLNdΔ:ıF1)'
  533. TGetRslBlk˜ °dONLNd–:1F;)<) r…İdONLNd”:;F¢)
  534. eturned by the LaserW  °dONLNdË:¢FÛ)griter and ImageWN¿°dONLNd¯:ÚF    )Priter °dONLNd˛FäR7(Oä'printer drivers. Both contain all the fi°dONLNd&F7Ri)≠ elds of the °dONLNd2FiR•)2
  535. TGetRslBlk°dONLNd<F•R˚)< data type, but the .°dONLNdPRä^¨([äLaserW◊†°dONLNdVR´^ƒ)!riter rˆ@°dONLNd]Rƒ^÷)ecorj†°dONLNdaR◊^L)d has values for the X and µÄ°dONLNd|RL^R)uY3`°dONLNd}RS^Y) rx`°dONLNdRY^¶)esolution range fi °dONLNdëR¶^ˆ)Melds and only one .°dONLNd£^äjé(gärR`°dONLNd§^éjΩ) esolution r$¿°dONLNdØ^Ωjœ)/ecor˜ °dONLNd≥^ŒjÒ)d, wher…İdONLNd∫^Òj;)#eas the ImageW  °dONLNd»^;jV)Jriter rfiİdONLNdœ^Ujg)ecor∞‡°dONLNd”^gj±)d has a value of ∞‡°dONLNd‰^±j∑)J0∞‡°dONLNdÂ^∑jÚ) in the X and É@°dONLNdÛ^Új˘);YU†°dONLNdÙ^˘j˚) .°dONLNdıjävç(särE°dONLNdˆjév€)esolution range fiK¿°dONLNdj€v)Melds and four rK¿°dONLNdjvK)A esolution rn°dONLNd"jKv])/ecor‚`°dONLNd&j]vl)ds. ˇ2b@ˇ ˇˇˇˇ@
  536. ˇ·ˇ‚7^
  537. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  538. (‡*1 )-c)18    )9Using the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  539. g*w¯4g*w¯"g*_
  540. ˇ·ˇ‚7^    °dONLNdˇˇ(dl
  541. Figure 1-5°dONLNd\Æg )BResolutions for LaserWÿ∞°dONLNd\ gP)]riter and ImageWØ–°dONLNd&\Pg)Eriter printers
  542. .°dONLNd5¿lÃs(…lYï°dONLNd6¿rÃ)ou can also set the imaging rg`°dONLNdS¿Ãd)~esolution you want to use. 9¿°dONLNdn¿dÃk)tYN¿°dONLNdo¿jÃä)ou call ,
  543. CourierN¿°dONLNdw¿äÿ)     PrGeneralN¿°dONLNdÄ¿¿ÃÌ)6
  544.  with the ˇˇÇ⁄°dONLNdäÃlÿá(’lvalue ˇ˛àé⁄°dONLNdêÃàÿ∏)SetRslOpˇˇÇ⁄⁄°dONLNdòÃ∏ÿŸ)0     for the ˇ˛àéãh°dONLNd°ßÿ˝)!opcodeˇˇÇ⁄ãh°dONLNdßÃ˝ÿ)$ fiB°dONLNd™Ãÿ•)    $eld of the parameter block and the rtò°dONLNdŒÃ•ÿ¯)üesolutions in the X .°dONLNd‚ÿl‰(·land øÄ°dONLNdÊÿ‰Ö)Y=`°dONLNdÁÿ܉ï) dirÜİdONLNdÎÿï‰3)%ections you want to use via the set-r˘°dONLNdÿ3‰b)û esolution r@°dONLNdÿc‰u)0ecor膰dONLNdÿu‰Ä)d (@°dONLNd"ÿʼn°) page 1-ưdONLNd)ÿ°‰´) 37ưdONLNd+ÿ´‰Ì)
  545. ). The Printing .°dONLNd;‰lö(Ìl    Manager rR`°dONLNdD‰öÕ). eturns the r$¿°dONLNdP‰Õ˚)3 esult code $¿°dONLNd[‰˚).noErr$¿°dONLNd`‰ô) if it has updated the print r˜ °dONLNd~‰ò™)ecor…İdONLNdlj™Ù)d with this new °dONLNdíl¸p(˘lrR`°dONLNdìp¸©)esolution, or R`°dONLNd°©¸fl)9    noSuchRslR`°dONLNd™fl¸)6  if the curr$¿°dONLNd∂¸ü)/"ent printer doesn’t support this r˜ °dONLNdÿû¸ )ê
  546. esolution.°dONLNd„lú( l Listing 1-4°dONLNdÓú)0 illustrates how to use the °dONLNd
  547. I)w    PrGeneral°dONLNdIU)6 prR`°dONLNdUr) ocedur$¿°dONLNdrÌ)e to determine the possible .°dONLNd8lo(lrE°dONLNd9p—)esolutions for the curr߆°dONLNdP—û)a1ent printer and then set the printer to the desirÜİdONLNdÅûØ)Õed r∞‡°dONLNdÖØ⁄)
  548. esolution.
  549. wl®¯4wl®¯
  550. wl®´4vkwlò(ã?ã?wl´Ÿ€ˇ¯€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸€ˇ¸ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸ'Û˛Ç<`¿`Hf ˛á˛;00¸0ˇ$˛$1ÄêàD¸Ç˛2 ˚ˇ&˝!"2ÅÑH˛˛@¸ ˇ)%√≠A$RÇÑi≈¢ÀOã@◊Ö¶4qZ<Máhߡ)%Fh¶h    A8TÇÑíZ√Qô5Å"ö⁄I¶öåi¶ jH≥Iˇ)%IDpflàB Y/ƒ!Éa9%"íâ'Iƒt§Dˇ)%    2XÄ$D@ëA!<°B&BuØ    &ú»íÑ—EÚˇ)%sËpx8‡◊Å~◊B::©$i«Ò»sB‹ˇ˛à˝!˝ı ˆ˛à˝^˝ı ˆ˛p˜ ı¿ˆŸ¿ 8ÉÄ` ÓÄå˝    D@0ÓîÑ@FPÓ<s(ÇîiáÓq÷—≤ƒ¥~ÍQØ8¥Úñ”B§íL§äZSJá JíE$”XÚ(EÇ…    E    ¢ÉîK$JDìêÚ-)|â<”i§,ùH!6í$ÎNd ÚIŒ≥Ü∏”HÁ$@·˜dú!‰ö„R4„†Ú ı@Ñ˘Ò ıx˘Ò͇ÒŸ@ Ë¸Ê¿`¸Ê@@˛ÄÊGûA¥œ5≈†    „ÁBIFÑ[Dîö¿§ÄˉQáRH®úÄHÁ$í»h§…K!iÄË ˚,áá$ñ}:F Ë ˝  ˝‚ p˝8‚Ÿ‡˛¿DÊê˛ÃÊ˛à ÄÍ#x8sû¸pâ£˝Œ–΃ê(E§Jiîàà§¶$ë`Îê$Ö(Tâ)    B$D°@Π   ‡&à»ñæm    öYHO"ÄΆcq«$[»‚ÓH5ÄÎ ¸ ˛‰¸ ‡¸¿‡Ÿ “¸ „ ∂¸    „    $@„    $h˚M„¥!„    $)1íDX!„    HPë"HP"„    lñb'à†$„    H˚¢á xò„ŸŸŸŸò(ã?ã?wl´Ÿ€ˇ¯€ € € € € € € € € € € "˛
  551. ħH¿˜
  552. ¸@§H¿˛ "˛
  553. Ä¥ ˜
  554. $@¥ ˛ "˛
  555. Ê    Δl∑_1&3g˜
  556. 'Zqÿ∑_a&fn˛ "˛
  557. üo¯∂O°œL…˜
  558. $ºU|∂O¡œôR˛ "˛
  559. ò    ≠àJL!(D…˜
  560. $†Uj`JLA(âR˛ "˛
  561. óÊxJO°';G˜
  562. $úU9‹JO¡'vN˛
  563. Â@¯ Êį € € € ?Ùˇ˛˚?Ùˇ˛  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  `˙˚ Ù  Äê ˙˚ Ù  y;˙˚ Ù  e    OÄ˙˚ Ù  §ôL˙˚ Ù  8f;Ä˙˚ Ù   ˆ˚ Ù   ˆ˚ Ù   ˆ˚ Ù  Ù˚ Ù  Ù˚ Ù ?Ûˇ˚?Ûˇ  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù   Ä0` ˛˚ Ù   Hê ˛˚ Ù   lÿÅúƒë„/≠˛˚ Ù   …0Çe‰ê∞È˛˚ Ù   I0Je뉴i˛˚ Ù   »–1ú‰`%—˛˚ Ù  ¸˛˛˚ Ù  ¸˛"˛˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù ?Ûˇ˚?Ûˇ  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  ˛˘˚ Ù  Ä˘˚ Ù  ôô€˘˚ Ù  ?˝W§˘˚ Ù  £aT$˘˚ Ù  ùù#ú˘˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù ?Ûˇ˚?Ûˇ  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  ˛Ä¸˚ Ù 
  564.  Äĸ˚ Ù 
  565.  ªéƒæ1‡Ä¸˚ Ù 
  566.  S‰©xĸ˚ Ù 
  567.  ∂S©A‡Ä¸˚ Ù 
  568.  ûN‰N8ĸ˚ Ù  H˘˚ Ù  à˘˚ Ù  ˝˘˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù ?Ûˇ˚?Ûˇ  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù      é˚˚ Ù              ˚˚ Ù       1öüg    sú¿˛˚ Ù   {Êïîée‡˛˚ Ù      Cfïîâje˝˚ Ù   â9öwdâ:\‡˛˚ Ù  ˘˝˚ Ù  ˘8˝˚ Ù  Ù˚ Ù  ¿˛Gc˛˚ Ù  ˛&˝»îÄ˚ Ù  Å£®xNîÄ˚ Ù  
  569. ôAP–AîÄ˚ Ù  
  570. ô"ASPxIîÄ˚ Ù   
  571. ô=âQËFc˛˚ Ù  ˝˘˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù ?Ûˇ˚?Ûˇ  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù      é˚˚ Ù              ˚˚ Ù       1öüg    sú¿˛˚ Ù   {Êïîée‡˛˚ Ù      Cfïîâje˝˚ Ù       9öwdâ:\‡˛˚ Ù  ˘˝˚ Ù  ˘8˝˚ Ù  Ù˚ Ù  ¿˛Gc˛˚ Ù  ˛&˝»îÄ˚ Ù  Å£®xNîÄ˚ Ù  
  572. ôAP–AîÄ˚ Ù  
  573. ô"ASPxIîÄ˚ Ù   
  574. ô=âQËFc˛˚ Ù  ˝˘˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚?Ûˇ ?Ûˇ˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  0É˚ Ù  ÄÄHÉ˚ Ù  ôôó7ôô∏Å•›‡É˚ Ù  ?ÂìLá>eHÇe(É˚ Ù  £eìLÑ¢%HJe)‡É˚ Ù  ùôs4ÑùŸ81ù,É˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù ?Ûˇ˚?Ûˇ  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù   R˛˚ Ù   ÄÄV˛˚ Ù  ôôó7ôô∏Ú ˚ Ù   ?ÂìLá>eHb˛˚ Ù   £eìLÑ¢%HÚ˛˚ Ù  ùôs4ÑùŸ8¢ ˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù 
  575.  ÄÃÄ Ã¸˚ Ù 
  576.  %22¸˚ Ù 
  577.  22¸˚ Ù 
  578.  22¸˚ Ù 
  579.  %22¸˚ Ù 
  580.  ÄÃB ø˚ Ù  ˝@˘˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚ Ù  Ù˚?Ûˇ  Ù˚ Ù ?Ûˇ˚ Ù Ûˇ˚ Ù ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ Î?Ûˇ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ Î?Ûˇ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ ΠÙ Î?Ûˇ ÎÛˇ € € € € € € € € € € € € €ˇ¸€ˇ¸ŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸŸ'Û˛Ç<`¿`Hf ˛á˛;00¸0ˇ$˛$1ÄêàD¸Ç˛2 ˚ˇ&˝!"2ÅÑH˛˛@¸ ˇ)%√≠A$RÇÑi≈¢ÀOã@◊Ö¶4qZ<Máhߡ)%Fh¶h    A8TÇÑíZ√Qô5Å"ö⁄I¶öåi¶ jH≥Iˇ)%IDpflàB Y/ƒ!Éa9%"íâ'Iƒt§Dˇ)%    2XÄ$D@ëA!<°B&BuØ    &ú»íÑ—EÚˇ)%sËpx8‡◊Å~◊B::©$i«Ò»sB‹ˇ˛à˝!˝ı ˆ˛à˝^˝ı ˆ˛p˜ ı¿ˆŸ¿ 8ÉÄ` ÓÄå˝    D@0ÓîÑ@FPÓ<s(ÇîiáÓq÷—≤ƒ¥~ÍQØ8¥Úñ”B§íL§äZSJá JíE$”XÚ(EÇ…    E    ¢ÉîK$JDìêÚ-)|â<”i§,ùH!6í$ÎNd ÚIŒ≥Ü∏”HÁ$@·˜dú!‰ö„R4„†Ú ı@Ñ˘Ò ıx˘Ò͇ÒŸ@ Ë¸Ê¿`¸Ê@@˛ÄÊGûA¥œ5≈†    „ÁBIFÑ[Dîö¿§ÄˉQáRH®úÄHÁ$í»h§…K!iÄË ˚,áá$ñ}:F Ë ˝  ˝‚ p˝8‚Ÿ‡˛¿DÊê˛ÃÊ˛à ÄÍ#x8sû¸pâ£˝Œ–΃ê(E§Jiîàà§¶$ë`Îê$Ö(Tâ)    B$D°@Π   ‡&à»ñæm    öYHO"ÄΆcq«$[»‚ÓH5ÄÎ ¸ ˛‰¸ ‡¸¿‡Ÿ “¸ „ ∂¸    „    $@„    $h˚M„¥!„    $)1íDX!„    HPë"HP"„    lñb'à†$„    H˚¢á xò„ŸŸŸŸˇ    Ë@ˇ ˇˇˇˇ@
  581. ˇ·ˇ‚7^
  582. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äUsing the Printing Manager
  583. ~¿(‡1‡)-a¿)19(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  584. gHj4gHj"gHa
  585. ˇ·ˇ‚7^    °dONLNdˇˇ(dä Listing 1-4°dONLNd\ŒgŒ)D:Using the GetRslDataOp and SetRslOp opcodes with PrGeneral,
  586. Courier
  587. .°dONLNd;sH∞(|H<FUNCTION DoSetMaxResolution (thePrRecHdl: THPrint): Integer;°dONLNdyèHõZ*VAR°dONLNdùf©ê+maxDPI:°dONLNdäùÆ©fi)HInteger;°dONLNdï´f∑ú(¥f    resIndex:°dONLNd¢´Æ∑fi)HInteger;°dONLNd≠πf≈¢(¬f
  588. getResRec:°dONLNdªπÆ≈)H TGetRslBlk;°dONLNd…«f”¢(–f
  589. setResRec:°dONLNd◊«Æ”)H TSetRslBlk;°dONLNd‰„HÔf(ÏHBEGIN°dONLNdÏÒf˝Æ+ maxDPI := 0;°dONLNd˚ˇf 2*"getResRec.iOpCode := getRslDataOp;°dONLNd fÍ*PrGeneral(@getResRec);°dONLNd<)f5Ï*A{At this point, we have an array of possible resolutions in the }°dONLNdÄ7fCÚ*B{ getResRec variable. After checking for errors, we loop through }°dONLNd≈EfQ¯*C{ each resolution range record looking for the highest resolution }°dONLNd Sf_¬*:{ available where x and y are equal.  This loop makes no }°dONLNdHafmº*9{ assumptions about the order of the resolution records.}°dONLNdá}fâ∂*8IF (getResRec.iError = noErr) AND (PrError = noErr) THEN°dONLNd¬ãfóÑ*BEGIN°dONLNdÀôx•å+.FOR resIndex := 1 TO (getResRec.iRslRecCnt) DO°dONLNd˝ßx≥ñ*BEGIN°dONLNdµä¡z+(IF (getResRec.rgRslRec[resIndex].iXrsl =°dONLNd4√äœå*+    getResRec.rgRslRec[resIndex].iYrsl) AND°dONLNde—ú›»+2(getResRec.rgRslRec[resIndex].iXrsl > maxDPI) THEN°dONLNdùflúΙ*-maxDPI := getResRec.rgRslRec[resIndex].iYrsl;°dONLNdŒÌx˘ê(ˆxEND;°dONLNd⁄    xÜ*-{We now have the desired resolution, set it.}°dONLNd%x1Í*IF maxDPI <> 0 THEN°dONLNd&3x?ñ*BEGIN°dONLNd0AäM+WITH setResRec DO°dONLNdFOä[®*BEGIN°dONLNdQ]úi+iOpCode := setRslOp;°dONLNdkkúw *hPrint := thePrRecHdl;ˇ@ˇ ˇˇˇˇ@
  590. ˇ·ˇ‚7^
  591. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  592. (‡*1 )-c)20    )9Using the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  593. Courier
  594. .°dONLNd\~hfi(e~iXRsl := maxDPI;°dONLNdj~vfi*iYRsl := maxDPI;°dONLNd+xlÑÑ(ÅlEND;°dONLNd4Ülí*PrGeneral(@setResRec);°dONLNdNîZ†r(ùZEND;°dONLNdZ∞Zº§*7IF (setResRec.iError = noErr) AND (PrError = noErr) AND°dONLNdñæl å+0(maxDPI <> 0) THEN DoSetMaxResolution := maxDPI;°dONLNd…ÃHÿZ(’HEND°dONLNdœ⁄Hʈ*ELSE DoSetMaxResolution := 0;°dONLNdÌË*ÙB(Ò*END;.°dONLNdÚl r+BY@İdONLNdÛr ï)ou can r√¿°dONLNd˚ï ·)#eset the original rzİdONLNd‚ ƒ)M5esolutions used by the printer driver by calling the .°dONLNdC l¢(l    PrGeneral°dONLNdL ¢Æ)6 prR`°dONLNdO ÆÀ) ocedur$¿°dONLNdU À˝) e with the $¿°dONLNd` ˝-)2SetRslOp$¿°dONLNdh -ë)0 opcode a second time. ˜ °dONLNd êó)cY  °dONLNdÄ óÌ)ou should save the ˇˇ˜|°dONLNdìl$÷(!lvalues contained in the ˇˇÊt]°dONLNd´◊$ı)kiVResˇˇ˜|]°dONLNd∞ı$    ) and ˇˇÊtL˰dONLNdµ
  595. $()iHResˇˇ˜|L˰dONLNd∫($0) fiDd°dONLNdΩ1$¿)    !elds of the printer information rÏ0°dONLNdfi¿$“)èecoræê°dONLNd‚“$)d beforàl°dONLNdÈÒ$˜)e ˇˇ√t°dONLNdÎ$l0®(-l making the fi˰dONLNd¯$©0’)= rst call to ˇˇJ\QD°dONLNd$’0 ),    PrGeneralˇˇ√tQD°dONLNd$ 0)6. Á°dONLNd$0)Y¸°dONLNd$0J)ou can also r‘°dONLNd$K0õ)6eset the original r5ê°dONLNd0$õ0¯)Pesolutions by calling °dONLNdF0l<~(9lthe °dONLNdJ0~<Δ) PrintDefault°dONLNdV0Δ<“)H prR`°dONLNdY0“<Ô) ocedur$¿°dONLNd_0Ô<>)e with the print r˜ °dONLNdq0=<O)Necor…İdONLNdu0O<¡)d, which sets all of the fi…İdONLNdê0¡<Û)r elds of the .°dONLNdú<lHà(Elprint rµ‡°dONLNd£<àHö)ecor*@°dONLNdß<õH.)#d to the default values of the curr8İdONLNd <.Hc)ìent printer rà°dONLNd◊<cH{)5esour–@°dONLNd‹<{Hå)ce fiñ‡°dONLNd·<çH¬) le. However’İdONLNdÏ<¬HÙ)5, if you use .°dONLNd˘HlT¥(Ql PrintDefault°dONLNdH¥T?)H" you lose all of the selections frR`°dONLNd'H?TÚ)ã)om the last time the user used the style .°dONLNdPTl`¨(]ldialog box.  (Y´@°dONLNd_T´`;)?!ou may want to set the original rö¿°dONLNdÄT;`“)ê"esolution because that may be the °dONLNd¢`llä(ilprinterÍİdONLNd©`ãl¨)    ’s best rÑ`°dONLNd≤`≠lA)"#esolution, though not its highest.)ˇˇ›‹.°dONLNd÷rl~K({l4If, based on the information you get with a call to ˇˇôît°dONLNd
  596. rL~Ç)‡    PrGeneralˇˇ›‹t°dONLNdrÇ~Æ)6  using the ˇˇôdONLNdrÆ~ˆ), GetRslDataOpˇˇ›‹¢°dONLNd*rˆ~˜)H °dONLNd+~lä(ál"opcode, you decide to change the rR`°dONLNdM~äp)ôesolution with a call to R`°dONLNdf~pä¶)k    PrGeneralR`°dONLNdo~¶ä”)6  using the °dONLNdzälñú(ìlSetRslOp°dONLNdÇäúñÂ)0G opcode, the Printing Manager may need to change the appearance of the .°dONLNd…ñl¢Á(ülVstyle and job dialog boxes, disabling some items. (The appearance of the dialog boxes °dONLNd¢lÆ¿* and which items ar    ‡°dONLNd1¢¡Æ`)U&e disabled is up to the printer driverˆ‡°dONLNdW¢_Æ|)û.) TherÀİdONLNd^¢|Æç)efor#İdONLNdb¢éÆÃ)e, you should °dONLNdpÆl∫“(∑ldetermine and set the r쇰dONLNdáÆ“∫˝)f
  597. esolution Ò °dONLNdëÆ˝∫)+beforc@°dONLNdñÆ∫)eF‡°dONLNdóÆ∫5) you pr¿°dONLNdûÆ5∫Ù) +esent the Printing Manager dialog boxes to °dONLNd…∫lΔè(√lthe user `°dONLNd—∫èΔô)#.   
  598. Î*Ò¯4Ï*Ò¯ Ïlϯ
  599. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd÷⁄lÎ=(ÁlDetermining Page Orientationˇˇˇˇˇˇ®(Á1
  600. °dONLNdÛÒl˝Ë(˙lWAt times it can be useful for your application to determine which page orientation the °dONLNdJ˝l    ò* Guser selected in the style dialog box. For instance, if an image only fiȰdONLNdí˝ò    Í(òts on a page if it is °dONLNd®    l‚(lVprinted in landscape orientation and the user has not selected landscape orientation, °dONLNd˛l!Õ* your application can rª‡°dONLNdÕ!î)a/emind the user to select this orientation beforh °dONLNdCï!≈)» e printing. °dONLNdO!l-$(*l*Otherwise, the user gets a clipped image. .°dONLNdz3l?Æ*If you call the °dONLNdä3Æ?‰)B    PrGeneral°dONLNdì3‰?)6 prR`°dONLNdñ3?) ocedur$¿°dONLNdú3??) e with the $¿°dONLNdß3??u)2    GetRotnOp$¿°dONLNd∞3u?‘)6 opcode, the Printing .°dONLNdΔ?lKö(Hl    Manager rW°dONLNdœ?öK).eturns a handle to the curr‡°dONLNdÍ?K;)u ent print r≥ °dONLNdı?;KM),ecor'İdONLNd˘?NKÁ)#d and a Boolean variable that says °dONLNdKlWˆ(TlYwhether or not the user has selected landscape orientation. Because the user should have °dONLNduWlcw* alr-`°dONLNdxWxcÏ) Ueady selected the type of orientation when you check this value, you should not call .°dONLNdÕclo¢(ll    PrGeneral°dONLNd÷c¢oœ)6
  601.  with the °dONLNd‡cœo)-    GetRotnOp°dONLNdÈcou)6 opcode until after you prR`°dONLNd    cuoı)pesent the style dialog box to .°dONLNd    !ol{è(xlthe user `°dONLNd    )oè{î)#. °dONLNd    ,Ålçö(äl Listing 1-5 @°dONLNd    7Åõçœ)/F illustrates how to determine whether the user has selected landscape °dONLNd    }çlô—(ñlorientation for the currg‡°dONLNd    ïç—ô)eent document.ˇz@ˇ ˇˇˇˇ@
  602. ˇ·ˇ‚7^
  603. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äUsing the Printing Manager
  604. ~¿(‡1‡)-a¿)21(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿    °dONLNdˇˇ(dä Listing 1-5°dONLNd\Œg    )DJUsing the GetRotnOp opcode with the PrGeneral procedure to determine page 
  605. pHs4pHs"pHa
  606. ˇ·ˇ‚7^°dONLNdJeŒp¯*     orientation,
  607. Courier
  608. .°dONLNdV|äà˛(Öä>FUNCTION DoIsLandscapeModeSet (thePrRecHdl: THPrint): Boolean;°dONLNdñòä§ú*VAR°dONLNdû¶ú≤ÿ+
  609. GetRotRec:°dONLNd©¶ÿ≤ )< TGetRotnBlk;°dONLNd∑¬äŒ®(ÀäBEGIN°dONLNd¡–ú‹V+GetRotRec.iOpCode := getRotnOp;°dONLNdÂfiúÍ\* GetRotRec.hPrint := thePrRecHdl;°dONLNd
  610. Ïú¯ *PrGeneral(@getRotRec);°dONLNd*úÊ*7IF (GetRotRec.iError = noErr) AND (PrError = noErr) AND°dONLNdgÆ"D+GetRotRec.fLandscape THEN°dONLNdÜ$Æ0Ã*BEGIN°dONLNdí2¿>n+DoIsLandscapeModeSet := TRUE;°dONLNdµ@ÆL¿(IÆEND°dONLNdΩNúZn(Wú#ELSE DoIsLandscapeModeSet := FALSE;°dONLNd·\äh¢(eäEND;
  611. êHñ4êHï êäê
  612. ˇ·ˇ‚7^ˇˇ◊.ˇ◊°dONLNdÊ~äèk*&Choosing Draft-Quality Printingˇˇˇˇˇˇ®(ã1
  613. °dONLNdïä°®(ûäDIf your application needs to print only text or bitmaps, it can incrå °dONLNdJï®° (û®ease performance and °dONLNd_°ä≠˝(™äTsave disk space by choosing draft-quality printing. The Printing Manager prints the °dONLNd≥≠äπÒ* document immediately‡°dONLNd«≠π∏)f0, rather than spooling it to disk as with deferrÄİdONLNd˜≠∏π)»ed printing. On the °dONLNd πä≈Ø(¬äImageWM‡°dONLNdπØ≈„)%riter printeró@°dONLNdπ‚≈/)3, draft printing pr<¿°dONLNd1π0≈˘)N,oduces quick, low-quality drafts. The LaserWî@°dONLNd]π¯≈)»riter °dONLNdc≈ä—b(Œä1printer does not print documents in draft-quality °dONLNdî≈b—i)ÿ.  .°dONLNdò◊ä„û(‡äIn orR`°dONLNdù◊û„«)
  614. der to for$¿°dONLNdß◊«„Ö)),ce draft-quality printing, you can call the $¿°dONLNd”◊Ö„ª)æ    PrGeneral$¿°dONLNd‹◊ª„«)6 pr˜ °dONLNdfl◊Δ„„) ocedur…İdONLNdÂ◊„„) e with the °dONLNd„äÔÃ(Ïä DraftBitsOp°dONLNd˚„ÃÔ)B opcode. The °dONLNd„ÔH): DraftBitsOp°dONLNd„HÔì)B opcode has no efR`°dONLNd$„ìÔ
  615. )Kfect if the printer does not .°dONLNdAÔä˚Y(¯ä/support draft-quality printing (like the LaserW°dONLNdpÔY˚)œ)riter printer) or does not support deferr+@°dONLNdôÔ˚)Æed °dONLNdú˚ä∞(ä    printing..°dONLNd¶ä◊*If you want to forR`°dONLNd∏◊ì)M+ce draft-quality printing, you should call R`°dONLNd„ì…)º    PrGeneralR`°dONLNdÏ…ˆ)6
  616.  with the °dONLNdˆä%Ã("ä DraftBitsOp°dONLNdÃ%)B opcode beforR`°dONLNd%):e pr$¿°dONLNd%Û)3esenting the style and job dialog boxes to the userg`°dONLNdEÚ%˜)€, .°dONLNdG%ä1˛(.äparticularly when the currπ °dONLNda%˛1l)tent printer is an ImageW@°dONLNdy%l1†)nriter printerQ†°dONLNdÜ%ü1‰)3. The use of the .°dONLNdó1ä=Ã(:ä DraftBitsOp°dONLNd¢1Ã=)BI opcode disables the landscape icon in the style dialog box and the Best .°dONLNdÎ=äI=(Fä*and Faster options in the job dialog box. °dONLNdOä[∏* Listing 1-6 @°dONLNd!Oπ[)/ illustrates how to for†°dONLNd8O[Ñ)^ce draft-quality printing.ˇ@ˇ ˇˇˇˇ@
  617. ˇ·ˇ‚7^
  618. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  619. (‡*1 )-c)22    )9Using the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯    °dONLNdˇˇ(dl Listing 1-6°dONLNd\∞gÛ)DQUsing the DraftBitsOp opcode with the PrGeneral procedure to force draft quality 
  620. p*s¯4p*s¯"p*a
  621. ˇ·ˇ‚7^°dONLNdQe∞pÕ*    printing,
  622. Courier
  623. .°dONLNdZ|là§(Öl4FUNCTION DoDraftBits(thePrRecHdl: THPrint): Boolean;°dONLNdêòl§~*VAR°dONLNdò¶~≤Ã+draftBitsBlk:°dONLNd¶¶Ã≤)N TDftBitsBlk;°dONLNd¥¬lŒä(ÀlBEGIN°dONLNdæ–~‹V+$draftBitsBlk.iOpCode := draftBitsOp;°dONLNdÁfi~ÍP*#draftBitsBlk.hPrint := thePrRecHdl;°dONLNdÏ~¯*PrGeneral(@draftBitsBlk);°dONLNd.~‡*;IF (draftBitsBlk.iError = noErr) AND (PrError = noErr) THEN°dONLNdoê"+DoDraftBits := TRUE°dONLNdä "∞)ê{ draft printing is on }°dONLNdß$~0(-~ELSE DoDraftBits := FALSE;°dONLNd $ 0»)¢{ draft printing is NOT on }°dONLNdÁ2l>Ñ(;lEND;°dONLNdÏJlVs*Yï°dONLNdÌJrV£) ou can call ï°dONLNd˘J£VŸ)1    PrGeneralï°dONLNdJŸV)6
  624.  with the ï°dONLNd JVT)-NoDraftBitsOpï°dONLNdJTVü)N opcode to turn ofg`°dONLNd+JüV¿)Kf the ef9¿°dONLNd3J¿VÙ)!fects of the °dONLNd@VlbÆ(_l DraftBitsOp°dONLNdKVÆb
  625. )B opcode, as shown in °dONLNd`V
  626. b:)\ Listing 1-7°dONLNdkV:bo)0. If you call °dONLNdyVob•)5    PrGeneral°dONLNdÇV•b¿)6 with °dONLNdàbln∫(klNoDraftBitsOp°dONLNdïb∫nÁ)N
  627.  without fPİdONLNdübÁn>)-irst calling it with PİdONLNd¥b>nÄ)W DraftBitsOpPİdONLNdøbÄn°)B, the pr"‡°dONLNd«b°næ)!ocedurı@°dONLNdÕbΩn⁄)e does °dONLNd‘nlzî(wl    nothing. !†°dONLNd›nîzÕ)( As with the !†°dONLNdÈnÕz)9 DraftBitsOp!†°dONLNdÙnz|)B opcode, you should call !†°dONLNdn|z≤)m    PrGeneral!†°dONLNdn≤zfl)6
  628.  with the °dONLNd zlÜ∫(ÉlNoDraftBitsOp°dONLNd-z∫ÜÙ)N opcode beforR`°dONLNd:zÙÜ):e you pr$¿°dONLNdBzÜÂ)#0esent the style and job dialog boxes to the userg`°dONLNdrz‰ÜÈ)Õ.     .°dONLNdˇˇ(¶l Listing 1-7°dONLNduû∞©–)DFUsing the NoDraftBitsOp opcode with the PrGeneral procedure to turn ofÂ@°dONLNdªû–©È(¶–f draft 
  629. ≤*µ¯4≤*µ¯"≤*a
  630. ˇ·ˇ‚7^°dONLNd√ß∞≤Í(Ø∞quality printing
  631. .°dONLNd‘ølÀ∞(»l6FUNCTION DoNoDraftBits(thePrRecHdl: THPrint): Boolean;°dONLNd €lÁ~*VAR°dONLNdÈ~ıÃ+draftBitsBlk:°dONLNd"ÈÃı)N TDftBitsBlk;°dONLNd0lä(lBEGIN°dONLNd:~b+&draftBitsBlk.iOpCode := nodraftBitsOp;°dONLNde!~-P*#draftBitsBlk.hPrint := thePrRecHdl;°dONLNdç/~;*PrGeneral(@draftBitsBlk);°dONLNd≠K~W‡*;IF (draftBitsBlk.iError = noErr) AND (PrError = noErr) THEN°dONLNdÓYêe+DoNoDraftBits := TRUE°dONLNdYe∂)~{ draft printing is NOT on }°dONLNd'g~s&(p~ELSE DoNoDraftBits := FALSE;°dONLNdEg&s§)®{ draft print is on }°dONLNd[ulÅÑ(~lEND;ˇF@ˇ ˇˇˇˇ@
  632. ˇ·ˇ‚7^
  633. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äUsing the Printing Manager
  634. ~¿(‡1‡)-a¿)23(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  635. mHs4nHs nän
  636. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd\ämÄ(iä$Altering the Style or Job Dialog Boxˇˇˇˇˇˇ®(i1
  637. °dONLNd%säæ(|ä The standarÌ@°dONLNd0sæÑ)4/d style and job dialog boxes that the printer rM†°dONLNd_sÖù)«esourdONLNddsùÆ)ce fi\İdONLNdisØ√)le prU†°dONLNdns√)ovides for the °dONLNd}äã¨(àäLaserW◊†°dONLNdÉ´ãÍ)!riter printer ar#`°dONLNdìÎã )@ e shown on ` °dONLNdû ã@)5page 1-釰dONLNd•@ãE) 7釰dONLNd¶Eã)0. Each dialog box has options that the user can .°dONLNd÷ãäó!(îä#set. If you want to use the standarR`°dONLNd˘ã!óµ)ó$d style or job dialog box, call the ,
  638. CourierR`°dONLNdãµó˜)î PrStlDialogR`°dONLNd(ã˜ó˘)B °dONLNd)ó䣥(†ä
  639. function (°dONLNd3ó¥£’)*page 1-°dONLNd:ó’£fl)!43°dONLNd<ófl£)
  640. ) or °dONLNdAó£2) PrJobDialog°dONLNdLó2£8)B (°dONLNdNó8£Y)page 1-°dONLNdUóY£c)!43°dONLNdWóc£î)
  641. ) function . .°dONLNde©äµê(≤äY@İdONLNdf©êµ)Vou may wish to add some additional options to these dialog boxes so that the user can °dONLNdºµä¡˙(æäcustomize the printing pr–İdONLNd’µ˙¡J)pocess even furthere°dONLNdÁµJ¡x)P    . HoweverÒ†°dONLNdµw¡ç)-, therî°dONLNdˆµé¡û)e ar¢†°dONLNd˙µû¡
  642. )e strict guidelines about °dONLNd¡äÕ( ä#altering style or job dialog boxes:,Zapf Dingbats°dONLNd8÷ä›è*n
  643. °dONLNd:”ñfl3) $If you want to add items to the curra‡°dONLNd^”3fl)ù0ent dialog box, add them only at the end of the °dONLNdéflñÎ(Ëñlist. Do not delete items frM¿°dONLNd™flÎz)rom the existing item list, rı°dONLNdΔflzÎ)r earrange them, or add new items °dONLNdÊÎñ˜(Ùñin the middle of the list. °dONLNdäè(än
  644. °dONLNd˝ñ    y) 2The additional options should be below the standarQ@°dONLNd6˝z     )‰"d ones in the dialog box, leaving °dONLNdX    ñ«(ñ the standar‡°dONLNdc    »)2d ones unchanged. °dONLNdvä%è($än
  645. °dONLNdxñ') Don’t count on an item r¥°dONLNdê'G)letaining its currY`°dONLNd°H'©)Fent position on the scr€‡°dONLNd∏©')aeen or in the dialog °dONLNdÕ'ñ3Ó(0ñitem list in the code.°dONLNd‰<äCè(Bän
  646. °dONLNdÊ9ñE’) Don’t use mor™°dONLNdÛ9’EI)?e than half the smallest scr`¿°dONLNd9JEæ)ueen height for your items. M°dONLNd*9æEfl)tApple rİdONLNd19‡E)" eserves the °dONLNd=EñQD(Nñ(right to expand the items in the standar¬†°dONLNdeEDQó)Æd dialog boxes to fi¿Ä°dONLNdyEòQ˝)Tll the top half of the scrO@°dONLNdìE˛Q)feen.°dONLNdòZäaè(`än
  647. °dONLNdöWñc°) >If you want to add a lot of items to the dialog boxes, be awarß@°dONLNdÿW°c(`°e this may confuse users. °dONLNdÚcñoú(lñY@İdONLNdÛcúo)Sou should consider having your own separate dialog box in addition to the existing °dONLNdFoñ{#(xñPrinting Manager dialog boxes. °dONLNdfÑäãè(ään
  648. °dONLNdhÅñçù) 8Dialog boxes may actually be color windows, which may afU°dONLNd†Åùç(äùfect your code somewhat.°dONLNdπìäü (úäVIf you want to modify either of the Printing Manager dialog boxes, you need to change °dONLNdüä´ˆ* the printing dialog box rs°dONLNd(üˆ´)lecorÁ`°dONLNd,ü´)d (◊°dONLNd/ü´4) page 1-¿°dONLNd6ü5´?)!39¿°dONLNd8ü?´`)
  649.     ). This r∂ °dONLNdAü`´r)!ecor*İdONLNdEüs´)#d contains a pointer to the dialog °dONLNdh´ä∑»(¥ä box’s window8°dONLNdt´»∑R)>!, a pointer to the dialog event fiH`°dONLNdñ´R∑`)älterr°dONLNdö´`∑∑), and a pointer to pr °dONLNdØ´∏∑÷)Xocedur•`°dONLNdµ´÷∑)es for °dONLNdº∑ä√`(¿ä1evaluating dialog items, and a handle to the curr°dONLNdÌ∑a√ç)◊ ent print rñ@°dONLNd¯∑ç√ü),ecor
  650. †°dONLNd¸∑†√´)d. °dONLNd…ä’ë(“äA∫†°dONLNd…ë’ì) :†°dONLNd…î’‘)dialog event fi6‡°dONLNd…’’‰)Alter¬@°dONLNd…‰’Ø). is a function that extends the Dialog Manager3¿°dONLNdC…±’)Õ’s event-handling °dONLNdU’ä·¬(fiäfunctionality¿°dONLNdb’¬·)8M. When your application displays the style or job dialog box, you can use an °dONLNdØ·äÌ™(Íäevent fiZ°dONLNd∑·´Ì)!Llter to handle events that the Dialog Manager doesn’t handle—such as update °dONLNdÌ䢓(ˆäevents in backgrü °dONLNdÌ“˘Ú)H<ound applications or the Command-period key-down event. The n °dONLNdOÌÛ˘(ˆÛdialog ˇˇË›°dONLNdV˘ä°(ähookˇˇÌ~.’¿°dONLNdZ˘°ø) in the ˇˇ»zû:°dONLNdb˘¿ˆ)    pItemProcˇˇÌ~û:°dONLNdk˘ˆ˛)6 fiã∏°dONLNdn˘ˇä)    eld is analogous to the Standaré°dONLNdç˘ã)å!d File dialog hook: it tells you .°dONLNdÆä(äYwhich item of which dialog box the user has selected, and you can handle the item or the °dONLNd    ä* ]printer driver can handle the item if it’s one of the original items of the dialog box.      ˇÙ@ˇ ˇˇˇˇ@
  651. ˇ·ˇ‚7^
  652. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  653. (‡*1 )-c)24    )9Using the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  654. Courier
  655. .°dONLNd\lhΔ(elTPrDlg = RECORD°dONLNdj~vñ+Dlg:°dONLNdjΔv)HDialogRecord;°dONLNd-jv)N °dONLNd1jDvŒ)0{Ptr to the dialog box}°dONLNdMx~Ñ∫(Å~
  656. pFltrProc:°dONLNd[xΔÑ8)HModalFilterProcPtr;°dONLNduxDÑ⁄)~{The dialog event filter}°dONLNdìÜ~í∫(è~
  657. pItemProc:°dONLNd°ÜΔí)HPItemProcPtr;°dONLNdµÜDíÊ)~{The item evaluating proc.}°dONLNd’î~†∫(ù~
  658. hPrintUsr:°dONLNd„îΔ†ˆ)HTHPrint;°dONLNdÚîD†∞)~{The print record}°dONLNd    ¢~Æ¢(´~fDoIt:°dONLNd¢Δƈ)HBoolean;°dONLNd"¢DÆ∂)~{Reserved by Apple}°dONLNd:∞~º¢(π~fDone:°dONLNdD∞Δºˆ)HBoolean;°dONLNdS∞Dº∂)~{Reserved by Apple}°dONLNdkæ~ ®(«~lUser1:°dONLNdvæΔ ˆ)HLongInt;°dONLNdÖæD ∂)~{Reserved by Apple}°dONLNdùÃ~ÿ®(’~lUser2:°dONLNd®ÃΔÿˆ)HLongInt;°dONLNd∑ÃDÿ∂)~{Reserved by Apple}°dONLNdœ⁄~Ê®(„~lUser3:°dONLNd⁄⁄Δʈ)HLongInt;°dONLNdÈ⁄DÊ∂)~{Reserved by Apple}°dONLNdË~Ù®(Ò~lUser4:°dONLNd ËΔÙˆ)HLongInt;°dONLNdËDÙ∂)~{Reserved by Apple}°dONLNd3ˆ~ñ(ˇ~END;.°dONLNd8lP(l5If you want to customize a style or job dialog box, fiÛ °dONLNdnPÒ)‰)rst call the initialization function for ˇˇ≤⁄.°dONLNdól&˛(#l"a pointer to that dialog box. The ˇˇécˆ°dONLNdπˇ&5)ì    PrStlInitˇˇ≤⁄cˆ°dONLNd¬5&`)6  function (…™°dONLNdÕ`&Ä)+page 1-|ѰdONLNd‘Å&ã)!45|ѰdONLNd÷ã&î)
  659. ) ræ°dONLNdŸï&¯)
  660. eturns a handle to the °dONLNd&l2è(/lstandarR`°dONLNd˜&è2ˆ)#d style dialog box; the R`°dONLNd&ˆ2,)g    PrJobInitR`°dONLNd&,2X)6  function (R`°dONLNd#&X2y),page 1-R`°dONLNd*&y2É)!45R`°dONLNd,&É2ç)
  661. ) r$¿°dONLNd/&ç2Ú)
  662. eturns a handle to the ˇˇÒ¯°dONLNdF2l>è(;lstandarR`°dONLNdM2è>:)#(d job dialog box. Then you can call the ˇˇ’Ë‘°dONLNdu2:>p)´    PrDlgMainˇˇÒ¯‘°dONLNd~2p>õ)6  function (∏°dONLNdâ2ú>º),page 1-™°dONLNdê2Ω>«)!44™°dONLNdí2«>˜)
  663. ) with the .°dONLNdù>lJÅ(Gladdr|İdONLNd°>ÅJ.))ess of your own initialization function. .°dONLNdÀPl\ä(YlThe prR`°dONLNd—Pä\®)ogram R`°dONLNd◊P®\)DoModifyDialogsR`°dONLNdÊP\-)Z , given in R`°dONLNdÒP-\])+ Listing 1-8R`°dONLNd¸P]\Ä)0, modifiR`°dONLNdPÄ\Û)#es the job dialog box. The ˇˇ¢∏°dONLNd\lhä(elPrintˇˇ‡Ë°dONLNd$\äh€) function calls the ˇˇ¢∏†°dONLNd8\‹h)R    PrJobInitˇˇ‡Ë†°dONLNdA\h])6 function and storx∏°dONLNdS\]h¯)K$es the handle to the job dialog box ˇˇçZ°dONLNdwhlty(qlit rfl∫°dONLNd{hyt€)eturns in the variable ˇ˛®"°dONLNdíh‹t$)c PrtJobDialogˇˇçZ"°dONLNdûh$t<)H. The ˇ˛®/÷°dONLNd§h<tZ)PrintˇˇçZ/÷°dONLNd©hZt¿) function then calls the ˇ˛®Úò°dONLNd¬h¿tˆ)f    PrDlgMainˇˇçZÚò°dONLNdÀhˆt˜)6 °dONLNdÃtlÄ”(}lfunction with the addrR`°dONLNd‚t”Ä    )gess of the pr$¿°dONLNdÔt    Äô)6!ogram’s initialization function, $¿°dONLNdtôÄ·)ê MyJobDlgInit$¿°dONLNdt·ÄÊ)H. ˇˇΩ`°dONLNdÜlí(èlThe ˇˇ8 =`°dONLNd#ÜÄí») MyJobDlgInitˇˇΩ`=`°dONLNd/Ü»íˆ)H  function fi∏ °dONLNd;܈í'). lls in the fi@°dONLNdHÜ'í≥)1!elds of the printing dialog box r2‡°dONLNdiÜ¥íΔ)çecor@°dONLNdmÜΔí¯) d, appends .°dONLNdxílûI(õl2the customized dialog items onto the dialog box, rô‡°dONLNd™íIûÛ)›'eplaces the original item handler with .°dONLNd—ûl™Ó(ßlthe customized item handler¬†°dONLNdÏûÌ™    )Å, and rï°dONLNdÛû    ™V)eturns the modifiï°dONLNdûV™ø)Med job dialog box to the ï°dONLNdûø™›)iPrintï°dONLNd"û›™fl) °dONLNd#™l∂b(≥l7function. The customized dialog item handler is in the °dONLNdZ™b∂û)ˆ
  664. MyJobItems°dONLNdd™û∂™)< prR`°dONLNdg™™∂«) ocedur$¿°dONLNdm™«∂Í)e. Note .°dONLNdu∂l¬k(øl:that your item handler must call the original item handlerË¿°dONLNdØ∂j¬)˛, so that the Printing Manager °dONLNdŒ¬lŒ*(Àl,can handle original items in the dialog box.°dONLNd˚‘l‡*"Please note that your dialog hook &@°dONLNd‘‡)ómust¥ °dONLNd!‘‡\) call the standarѰdONLNd2‘]‡Ò)F#d dialog hook to handle all of the °dONLNdU‡lÏç(Èlstandar±Ä°dONLNd\‡çÏÇ)!9d dialog’s original items. If you wish to have an event fiz °dONLNdñ‡ÉÏë)ˆlter£¿°dONLNdö‡ëÏÈ), handle it the same °dONLNdØÏl¯¯(ılway that you do a dialog hook. 
  665. *¯4*¯°dONLNdˇˇ*NOTE
  666. ˇ·ˇ‚7^
  667. °dONLNdœl§* The code  in ¿†°dONLNd‹§“)8 Listing 1-8`‡°dONLNdÁ”{)/( works for the style dialog box if you rȇ°dONLNd{ô)®eplace °dONLNdl'›($lall of the functions specifi∞‡°dONLNd2›'ç)q)c to the job dialog box with those specifir@°dONLNd\é'î)±c °dONLNd^'l3”(0lfor the style dialog box.,Zapf Dingbatsp¿°dONLNdˇˇ)ku
  668. V*Y¯4V*Y¯"V*a
  669. ˇ·ˇ‚7^    °dONLNdˇˇ(Sl Listing 1-8°dONLNdåK∞V/)D Adding items to a job dialog box
  670. °dONLNd≠]li!(fl(See the chapter “Dialog Manager” in the ÆÄ°dONLNd’]!if)µInside MacintoshêİdONLNdÂ]gil)F: êİdONLNdÒ]liü) Macintosh T°dONLNd¸]üi∏)3oolbox∫°dONLNd    ]∏i€) for morÑİdONLNd    
  671. ]‹i„)$e °dONLNd     iluP(rl3information about dialog boxes, dialog items, and fi‡°dONLNd    @iQul)Âlter pr>°dONLNd    Giluä)ocedur’@°dONLNd    Miäu›)es. See the chapter °dONLNd    aulÅì(~l“Standar¥@°dONLNd    iuìÅı)'d File Package” in the r`°dONLNd    ÄuˆÅ;)cInside MacintoshT`°dONLNd    êu<ÅA)F: T`°dONLNd    úuAÅä)Operating SystemÓ‡°dONLNd    ¨uäÅ“)I volume for mor‚@°dONLNd    ªu“ÅŸ)He °dONLNd    ΩÅlçÒ(älinformation about the Standar†°dONLNd    ⁄ÅÚçG)Üd File dialog hook. ˇ.n@ˇ ˇˇˇˇ@
  672. ˇ·ˇ‚7^
  673. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äUsing the Printing Manager
  674. ~¿(‡1‡)-a¿)25(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  675. mHs4nHs nän
  676. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd\ämô(iäW(°dONLNd\ôm)riting an Idle Prˇ °dONLNd\m5)locedur˛Ä°dONLNd\5m<)0eˇˇˇˇˇˇ®)Ÿ1
  677. °dONLNdsäÚ(|äThe Printing Manager rm†°dONLNd0sÚ2)huns the idle pr]¿°dONLNd?s2P)@ocedurı°dONLNdEsP)*e while it sends a document to the printer‡°dONLNdos)∏. °dONLNdqäãû(àä(See &‡°dONLNdvüã‘) “The Idle Pr›Ä°dONLNdÇ‘ãÚ)5ocedurt¿°dONLNdàÛã-)e” on page 1-¥°dONLNdï-ã2):8¥°dONLNdñ2ãõ).) The Printing ManagerT@°dONLNd≠ùãÂ)k’s default idle pr¿‡°dONLNdøÂã)HocedurX °dONLNd≈ã )e °dONLNd«ãäó>(îä*allows the user to cancel printing. The pr`°dONLNdÒã?ó])µocedur߆°dONLNd˜ã]ó¬)e just polls the keyboar[@°dONLNdã√ó˘)fd and sets a °dONLNdóä£Á(†äPrinting Manager err‘İdONLNd0óÁ£)]Aor code if the user types Command-period (to cancel the printing °dONLNdq£äØ
  678. (¨äjob). If you use the default prÉ@°dONLNdê£
  679. Ø()ÄocedurİdONLNdñ£)Ø)6e, you should display a dialog box during printing to °dONLNdÃØäª©(∏ä=inform the user that the Command-period command is available.°dONLNd
  680. ¡äÕ7*'If you choose to write your own idle prÄ¿°dONLNd1¡7ÕU)≠ocedur°dONLNd7¡VÕˇ)(e instead of using the default Printing °dONLNd_ÕäŸæ(÷ä
  681. Manager prY °dONLNdiÕæŸ‹)4ocedur`°dONLNdoÕ‹Ÿ˜)e, ther\`°dONLNdvÕ¯Ÿ)e ark°dONLNdzÕŸ¨)%e several guidelines you must follow:,Zapf Dingbats°dONLNd†‚äÈè(Ëän
  682. .°dONLNd¢flñÎ ) If you designate an idle prR`°dONLNdΩfl Î))vocedur$¿°dONLNd√fl)Î})e, you must set the ,
  683. Courier$¿°dONLNd◊fl}Î≥)T    PIdleProc$¿°dONLNd‡fl≥κ)6 fi$¿°dONLNd„flºÎ)    eld of the print .°dONLNdÙÎñ˜ô(ÙñrE°dONLNdıÎö˜¨)ecorπ`°dONLNd˘Î¨˜¥)d U °dONLNd˚ε˜«)    afterß¿°dONLNdΫ˜”) prÓ‡°dONLNdΔ˜§) 1esenting the dialog boxes, validating the print r«‡°dONLNd4Χ˜∂)—ecor<@°dONLNd8Î∑˜)d, and initializing °dONLNdL˜ñ¨(ñthe fiÍ °dONLNdR˜¨)elds in the printing rä¿°dONLNdh˜)[ecorˇ °dONLNdl˜])d, because the råİdONLNd|˜^)E&outines that perform these operations .°dONLNd¢ñö( ñrR`°dONLNd£ö¿)    eset the R`°dONLNd¨¿ˆ)&    PIdleProcR`°dONLNdµˆˇ)6 fiR`°dONLNd∏ˇ)    eld to R`°dONLNdø-)NILR`°dONLNd¬-2). .°dONLNd≈äè(än
  684. ˇˇ¸Ç.°dONLNd«ñ!ù) Yï°dONLNd»ú!)ou must install your idle prUͰdONLNd‰!2)yocedur(J°dONLNdÍ2!r)e in the print rÏ≤°dONLNd˙r!Ñ)@ecorø°dONLNd˛Ñ!¢)d beforçÙ°dONLNd£!›)e calling the ˇˇıÜÉz°dONLNdfi!);    PrOpenDocˇˇ¸ÇÉz°dONLNd!)6 .°dONLNd!ñ-ü(*ñprG °dONLNd!†-æ)
  685. ocedurfi`°dONLNd%!æ-µ):e. Otherwise, the printer driver does not give the idle pr‡¿°dONLNd_!µ-”)˜ocedurx°dONLNde!‘-) e any time. .°dONLNdq-ñ9ù(6ñYï°dONLNdr-ú9)ou install a pointer to your prg`°dONLNdë-9<)Éocedur9¿°dONLNdó-<9`)    e in the 9¿°dONLNd†-`9ñ)$    pIdleProc9¿°dONLNd©-ñ9ü)6 fi9¿°dONLNd¨-ü9)    eld of the printing job .°dONLNdƒ9ñE©(Bñsubr¿°dONLNd»9™Eº)ecorÖ °dONLNdÃ9ºE«)d (t¿°dONLNdœ9»EË) page 1-£Ä°dONLNd÷9ËEÚ) 31£Ä°dONLNdÿ9ÚE˙)
  686. ). °dONLNd‹NäUè(Tän
  687. °dONLNdfiKñW) Do not attempt any printing fr÷°dONLNd¸KWy)Üom within the idle prá°dONLNdKzWò)^ocedur@°dONLNdKôWˇ)e, because the Printing °dONLNd/Wñc…(`ñ Manager is 7`°dONLNd:W c◊)4not䆰dONLNd=W◊c›) rœ†°dONLNd?W›c)    eentrant.°dONLNdIläsè(rän
  688. .°dONLNdKiñuù) Yï°dONLNdLiúu”)ou must call ï°dONLNdYi”u!)7WaitNextEventï°dONLNdfi!uK)N
  689.  to capturg`°dONLNdpiKu˘)*%e mouse clicks or the Command-period .°dONLNdïuñÅà(~ñ8sequence that signals the user wants to cancel printing.°dONLNdŒääëè(êän
  690. .°dONLNd–áñì) Don’t call the QuickDraw °dONLNdÈáìP)x OpenPicture°dONLNdÙáPìÉ)B function or °dONLNdáÉì≈)3 DrawPicture°dONLNd á≈ì—)B prR`°dONLNdá—ìÓ) ocedur$¿°dONLNdáÓì¯)e. .°dONLNdúä£è(¢än
  691. .°dONLNdôñ•ù) Yï°dONLNdôú•)ou must save the printerR`°dONLNd4ô    •)m’s R`°dONLNd7ô•B)    grafPortR`°dONLNd?ôB•±)0 upon entry to the idle pr$¿°dONLNdYô±•Œ)oocedur˜ °dONLNd_ôÕ•Î)e and r…İdONLNdfôΕ)estorõ‡°dONLNdkô•)e it .°dONLNdp•ñ±o(Æñ1upon exit if you draw anything within the idle pr? °dONLNd°•p±é)⁄ocedur÷`°dONLNdß•é±)e. If you don’t, the printer .°dONLNdƒ±ñΩ˘(∫ñdriver draws into the °dONLNd⁄±˘Ω))cgrafPort°dONLNd‚±)ΩŒ)0' of your dialog box instead of its own °dONLNd    ±ŒΩ˛)•grafPort°dONLNd±˛Ω    )0. Tï°dONLNd±Ω)
  692. o °dONLNdΩñ…fl(Δñsave the printer=`°dONLNd&Ω‡…È)J’s =`°dONLNd)ΩÈ…)    grafPort=`°dONLNd1Ω…D)0 , call the =`°dONLNd<ΩD…n)+GetPort=`°dONLNdCΩn…z)* pr¿°dONLNdFΩz…ó) ocedur‚ °dONLNdLΩñ…)e when entering the idle °dONLNde…ñ’†(“ñprR`°dONLNdg…†’Ω)
  693. ocedur$¿°dONLNdm…Ω’‡)e. Befor˜ °dONLNdu…fl’5)"e you exit, call the ˜ °dONLNdä…5’_)VSetPort˜ °dONLNdë…_’k)* pr…İdONLNdî…k’à) ocedurõ‡°dONLNdö…à’)e to set the port back to the °dONLNd∏’ñ·’(fiñprinter driver=`°dONLNdΔ’÷·fl)@’s =`°dONLNd…’fl·)    grafPort=`°dONLNd—’·,)0. (The =`°dONLNdÿ’,·V)GetPort=`°dONLNdfl’V·k)* and =`°dONLNd‰’k·ï)SetPort=`°dONLNdÎ’ï·°)* pr¿°dONLNdÓ’°·æ) ocedur‚ °dONLNdÙ’Ω·“)es ar¥Ä°dONLNd˘’“·)e described in .°dONLNd·ñÌ(Íñthe chapter “QuickDraw”.)°dONLNd"ˆä˝è(¸än
  694. °dONLNd$Ûñˇ”) If your idle pr.°dONLNd3Û‘ˇÚ)>ocedur≈@°dONLNd9ÛÚˇ3)e changes the rZ°dONLNdHÛ4ˇL)Besour¢@°dONLNdMÛLˇÒ)&ce chain, you should save the printer .°dONLNdsˇñ ≥(ñdriver=`°dONLNdyˇ¥ ¡)’s r¿°dONLNd}ˇ¡ ÿ)esour‚ °dONLNdǡ◊ ?)ce chain by calling the ‚ °dONLNdöˇ? {)h
  695. CurResFile‚ °dONLNd§ˇ{ )<# function and saving the ID of the .°dONLNd« ñ“(ñprinter driver√¿°dONLNd’ ”‡)=’s r°dONLNdŸ ·˘)esourU@°dONLNdfi ˘
  696. )ce fi‡°dONLNd„  ü)#le at the beginning of your idle prg°dONLNd     üΩ)îocedur˛@°dONLNd      Ω„)    e. (Any ràİdONLNd     ‰)'outine ˇˇ±:.°dONLNd    ñ#d( ñ.that changes the value of the global variable ˇˇÆ    –°dONLNd    Je#õ)œ    TopMapHdlˇˇ±:    –°dONLNd    Sõ#“)6, such as the ˇˇÆŒ∏°dONLNd    a“#)7 OpenResFileˇˇ±:Œ∏°dONLNd    l#)B °dONLNd    m#ñ/Ÿ(,ñfunction or the °dONLNd    }#Ÿ/)C
  697. UseResFile°dONLNd    á#/!)< prR`°dONLNd    ä#!/>) ocedur$¿°dONLNd    ê#>/Ñ)e, changes the r˜ °dONLNd    †#É/ö)Eesour…İdONLNd    •#ö/)ce chain. Some printer .°dONLNd    º/ñ;(8ñdrivers assume the rW`°dONLNd    –/;)Zesourü†°dONLNd    ’/;·)0ce chain does not change, and you may get an err+İdONLNd
  698. /‚;
  699. )⁄
  700. or if you °dONLNd
  701. ;ñG.(Dñ#do change it.) When you exit for fre†°dONLNd
  702. 2;.Gl)òom the idle prâ¿°dONLNd
  703. @;lGä)>ocedur!°dONLNd
  704. F;ãGò)e, r؆°dONLNd
  705. J;òG≠)estor3 °dONLNd
  706. O;ÆG…)e the rü °dONLNd
  707. V;…G·)esourÁ`°dONLNd
  708. [;·G)    ce chain .°dONLNd
  709. dGñS¡(Pñ    with the °dONLNd
  710. mG¡S˝)+
  711. UseResFile°dONLNd
  712. wG˝S    )< prR`°dONLNd
  713. zG    S&) ocedur$¿°dONLNd
  714. ÄG&SV) e. If you ar˜ °dONLNd
  715. åGUS≠)/e not changing the r…İdONLNd
  716. †G≠Sƒ)Xesourõ‡°dONLNd
  717. •GƒS)ce chain, you do °dONLNd
  718. ∂Sñ_ı(\ñnot need to save the rR`°dONLNd
  719. ÃSı_ )_esour$¿°dONLNd
  720. —S _:) ce chain. ($¿°dONLNd
  721. ‹S:_v).
  722. CurResFile$¿°dONLNd
  723. ÊSv_{)<, $¿°dONLNd
  724. ËS{_Ω) OpenResFile$¿°dONLNd
  725. ÛSΩ_’)B, and $¿°dONLNd
  726. ˘S’_)
  727. UseResFile$¿°dONLNd S_)< .°dONLNd _ñkû(hñarE°dONLNd _ük7)    "e described in the chapter “Resour9°dONLNd (_7k})òce Manager” of N@°dONLNd 7_}k«)FInside Macintosh: 0@°dONLNd S_»kÙ)K
  728. Operating °dONLNd ]kñw≥(tñSystemÒİdONLNd ck≥w∏).)°dONLNd fÄäáè(Üän
  729. ˇˇk`.°dONLNd h}ñâû) Aï°dONLNd i}ùâÊ)void calling the ˇ˛B ◊ °dONLNd z}Êâ)IPrErrorˇˇk`◊ °dONLNd Å}âà)* function within the idle pr¬`°dONLNd ù}àâ•)xocedurî¿°dONLNd £}•âº)e. Err“İdONLNd ©}ºâ)ors that occur while .°dONLNd æâñïfi(íñit is executing ar”†°dONLNd –âfiï¥)H0e usually temporary and serve only as internal fl‰‡°dONLNd â¥ï‘)÷ags for °dONLNd     ïñ°J(ûñ'communication within the printer driver„¿°dONLNd 0ïI°)≥-, not for the application. If you absolutely .°dONLNd ]°ñ≠¡(™ñ
  730. must call °dONLNd g°¡≠Î)+PrError°dONLNd n°Î≠D)* within your idle prR`°dONLNd ǰD≠a)Yocedur$¿°dONLNd à°a≠ï) e and an err˜ °dONLNd î°î≠˘)3or occurs, do not cancel ˇ!Ã@ˇ ˇˇˇˇ@
  731. ˇ·ˇ‚7^
  732. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  733. (‡*1 )-c)26    )9Using the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  734. °dONLNd\xh´(ex printing. WŒ¿°dONLNd \™h>)2%ait until the last called printing prQİdONLNd0\?h])ïocedurË¿°dONLNd6\]hh)e r˜`°dONLNd9\hhÔ)  eturns and then check to see if °dONLNdYhxtï(qxthe err^†°dONLNd`hït∑)
  735. or still rƒ@°dONLNdjh∑t€)"emains. °dONLNdszlÜ(Él%For information about installing a pr °dONLNdòzÜ,)¢ocedur™`°dONLNdûz,Üc)e to handle r·`°dONLNd´zcÜ‚)7equests to cancel printing or °dONLNd…Ülí¬(èlpause printing, see ô‡°dONLNd›Ü¬íh)V%“Canceling or Pausing the Printing PrY`°dONLNdÜiíµ)ßocess” on page 1-¯`°dONLNdܵíø)L28¯`°dONLNdÜøíƒ)
  736. . ¯`°dONLNd܃íΔ) 
  737. ∑*Ω¯4∏*Ω¯ ∏l∏¯
  738. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd¶l∑¯(≥lOptimizing Printingˇˇˇˇˇˇ®(≥1
  739. °dONLNd-Ωl…;(Δl,QuickDraw is the primary means you use in orA°dONLNdYΩ<…Ï)–)der to print, and in general you can use .°dONLNdÇ…l’Á(“lQuickDraw in the printing ,
  740. Courier°dONLNdú…Á’){grafPort°dONLNd§…’ú)0 exactly as you would for a scrR`°dONLNd√…ú’≠)Öeen R`°dONLNd«…≠’›)grafPortR`°dONLNdœ…›’‚)0. °dONLNd—’l·Ç(filTherR`°dONLNd’’Ç·ì)e ar$¿°dONLNdŸ’ì·{)4e a few things to note when drawing to the printing $¿°dONLNd’{·´)ËgrafPort$¿°dONLNd’´·∞)0: ,Zapf Dingbats.°dONLNdÍlÒq(ln
  741. .°dONLNdÁxÛÉ) WÛ`°dONLNdÁÇÛ=)
  742. )ith each new page, you get a completely r≈¿°dONLNdDÁ=Ûw)ªeinitialized ≈¿°dONLNdQÁwÛß):grafPort≈¿°dONLNdYÁßÛˆ)0, so you’ll need to °dONLNdmÛxˇ|(¸xrR`°dONLNdnÛ|ˇ
  743. ) eset font information and other R`°dONLNdéÛ
  744. ˇ:)égrafPortR`°dONLNdñÛ:ˇ•)0 characteristics as desir$¿°dONLNdØÛ•ˇ≥)ked..°dONLNd≥lq(ln
  745. °dONLNdµxg) 6Don’t make calls that don’t do anything on the printer›@°dONLNdÎfÒ)Ó . For example, erase operations °dONLNd xÄ(xarE°dONLNdÅ3)    &e quite time-consuming and normally arw °dONLNd33•)≤en’t needed on the printerïİdONLNdM•ß)r.°dONLNdO&l-q(,ln
  746. °dONLNdQ#x/W) 5Don’t use clipping to select text to be printed. Ther#‡°dONLNdÜ#X/h)‡e ar2İdONLNdä#h/—)e a number of subtle dif `°dONLNd¢#—/›)ifer‡°dONLNd•#›/˜) ences °dONLNd´/x;(8x#between how text appears on the scrx °dONLNdŒ/;Ô)°1een and how it appears on the printer; you can’t °dONLNdˇ;xGI(Dx.count on knowing the exact dimensions of the rG¿°dONLNd-;JGÃ)“ectangle occupied by the text.°dONLNdLPlWq(Vln
  747. °dONLNdNMxY´) Don’t use fi®@°dONLNdZM´Y€)3Exed-width fonts to align columns. Since spacing gets adjusted on the °dONLNdüYxeñ(bxprintero¿°dONLNd¶Yñe[),, you should explicitly move the pen to wher°dONLNd“Y\eò)Δe you want it.°dONLNd·nluq(tln
  748. °dONLNd„kxw) &Don’t use the Outline text style to crƆ°dONLNd    kwß)ü!eate white text on a black backgr©`°dONLNd*kßw¿)êound.°dONLNd0Äláq(Üln
  749. .°dONLNd2}xâÄ) Aï°dONLNd3}âi)3void using the QuickDraw erase calls (for example, ï°dONLNdf}iâü)Í    EraseRectï°dONLNdo}üâ™)6).  6†°dONLNds}™â◊)
  750. An erase r    °dONLNd}}◊âı)-outine .°dONLNdÑâxïT(íx3takes time because every bit (90,000 bits per squarÅ@°dONLNd∑âTï≤)‹e inch) has to be clear‡°dONLNdŒâ≥ïÛ)_ed.  Erasing is °dONLNdfiïx°Ω(ûxHunnecessary because the paper does not need to be erased the way the scr≤†°dONLNd&ïΩ°Ë(ûΩ
  751. een does. .°dONLNd0°x≠Ä(™xAï°dONLNd1°≠¡)void using the ï°dONLNd@°¡≠Î)BTextBoxï°dONLNdG°Î≠˜)* prg`°dONLNdJ°˜≠) ocedur9¿°dONLNdP°≠í)e, which makes calls to the 9¿°dONLNdl°í≠»)~    EraseRect9¿°dONLNdu°»≠ )6 .°dONLNdv≠xπÅ(∂xprG °dONLNdx≠Çπ†)
  752. ocedurfi`°dONLNd~≠†π¨)e.  ˙`°dONLNdÇ≠¨π≤) Y∫‡°dONLNdÉ≠≤π&)ou might want to use a difÒİdONLNdù≠&π2)tfer‘°dONLNd†≠2πÛ) ,ent method of displaying text (for example, .°dONLNdÃπx≈¥(¬x
  753. DrawString°dONLNd÷π¥≈¡)< or °dONLNd⁄π¡≈Ò)DrawText°dONLNd‚πÒ≈u)0) or write your own version of °dONLNdπu≈ü)ÑTextBox°dONLNdπü≈¢)*..°dONLNd
  754. Œl’q(‘ln
  755. °dONLNd Àx◊) A\@°dONLNdÀ◊‡)void changing fonts fr °dONLNd#À·◊)bequentlyΩ °dONLNd+À◊)%.  °dONLNd/‡lÁq(Êln
  756. °dONLNd1›xÈ“) Because of the way r5@°dONLNdE›”È=)[ectangle intersections arf‡°dONLNd^›=È≥)je determined, if your clip r `°dONLNdz›≥È‚)v egion falls ˇˇ˜|.°dONLNdÜÈxıª(Úxoutside of the r8‘°dONLNdñȺı)Dectangle given by the ˇˇÊtƒ°dONLNd¨Èı<)brPageˇˇ˜|ƒ°dONLNd±È<ıD) fi@°dONLNd¥ÈEıfi)    #eld of the printer information subr∂ °dONLNd◊Èfiı)ôecoràl°dONLNd€Èı˜)d .°dONLNd›ıx∞(˛xof the print r\†°dONLNdÎı∞¬)8ecor—°dONLNdÔı¬~)*d, you slow down the printer substantially9‡°dONLNdı~Ä)º.
  757. &*,¯4'*,¯ 'l'¯
  758. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNdl&B("lOptimizing PostScript Printingˇˇˇˇˇˇ®("1
  759. °dONLNd:,l8◊(5lQWhile your printing code should be device-independent, you can optimize it for a °dONLNdã8lDé* LaserW◊†°dONLNdë8çD()!&riter printer that uses PostScript. (Y·†°dONLNd∑8(Dq)õou cannot be surİdONLNd«8rDØ)Je that the curr؆°dONLNd÷8ØDÒ)=ent printer is a °dONLNdÁDlPπ(MlPostScript printerΩ¿°dONLNd˘DπP|)M), so you may need to send down two or mor @°dONLNd    "D|PÂ)√e versions of the same fi≠¿°dONLNd    ;DÊPÚ)jle: °dONLNd    ?Pl\„(Ylone for a PostScript printer
  760. @°dONLNd    [P„\f)w, one for a QuickDraw printerò °dONLNd    xPe\Á)Ç .) For printing to a PostScript °dONLNd    ò\lhä(elprintero¿°dONLNd    ü\ähg)5, you’ll need to observe the following limitations:  °dONLNd    ’qlxq(wln
  761. °dONLNd    ◊nxz¶)
  762. Regions ar8°dONLNd    ·nßz¿)/?en’t supported; try to simulate them with polygons or bitmaps. °dONLNd
  763. !Éläq(âln
  764. °dONLNd
  765. #Äxå•)
  766. Clipping r˘‡°dONLNd
  767. -Ä•å#)-egions should be limited to rQ°dONLNd
  768. JÄ$å≈)%ectangles. PostScript clips non-squary@°dONLNd
  769. oÄ≈åÛ)° e patterns °dONLNd
  770. zåxòú(ïxto squarZ °dONLNd
  771. Çåúò™)$es. °dONLNd
  772. á°l®q(ßln
  773. ˇˇ…$.°dONLNd
  774. âûx™ã) The ˇˇ[lI$°dONLNd
  775. çûå™∞)invertˇˇ…$I$°dONLNd
  776. ìû∞™L)$" data type, part of the QuickDraw ˇˇ[l… °dONLNd
  777. µûL™|)úgrafverbˇˇ…$… °dONLNd
  778. Ωû|™˜)0 data type, is not supported .°dONLNd
  779. ⁄™x∂Á(≥xby the PostScript LaserW¿°dONLNd
  780. Ú™Á∂8)oriter printer driver<`°dONLNd ™8∂=)Q. ˇ!@ˇ ˇˇˇˇ@
  781. ˇ·ˇ‚7^
  782. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äUsing the Printing Manager
  783. ~¿(‡1‡)-a¿)27(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿,Zapf Dingbats°dONLNd_äfè(eän
  784. °dONLNd\ñhú) T∫¿°dONLNd\õhÂ)ransfer modes ar¸¿°dONLNd\Âh)Je ignor…¿°dONLNd\hÌ)4ed for all QuickDraw objects except 1-bit bitmaps. WJ`°dONLNdN\Ìh)È
  785. ith 1-bit .°dONLNdXhñt¿(qñ    bitmaps, ,
  786. Courier°dONLNdah¿tÍ)*srcCopyd@°dONLNdhhÈtÓ)), d@°dONLNdjhÓt )srcOr¶‡°dONLNdoh t), ¶‡°dONLNdqht4)srcBic¶‡°dONLNdwh4t9)$, ¶‡°dONLNdyh9tu)
  787. notSrcCopyã °dONLNdÉhttå);, and ã °dONLNdâhåt¬)    notSrcBitã °dONLNdíh¬tŒ)6 ar]İdONLNdïhŒt ) e drawn. The °dONLNd¢tñÄö(}ñc°dONLNd£töĨ)opy°dONLNd¶t¨Ä)S transfer mode is the only transfer mode supported for all objects except text and .°dONLNd˘Äñå»(âñ bit images. °dONLNdïäúè(õän
  788. °dONLNdíñû™) Ther¿°dONLNd í´ûˇ)e can be a small difÈ`°dONLNd í˛û
  789. )SferÀ‡°dONLNd#í
  790. û≠) $ence in glyph widths between fonts r‡°dONLNdGíÆû«)§enderT@°dONLNdLí«ûˇ)ed on the scrP °dONLNdYíˇû)8een °dONLNd]ûñ™Ê(ßñand on the printer °dONLNdoûÊ™ä)P'. Only the endpoints of text strings arh°dONLNdñûä™Ω)§ e the same. °dONLNd£≥ä∫è(πän
  791. °dONLNd•∞ñº») GPostScript does not support color patterns that use colors other than r0İdONLNdÏ∞…º‚(π…ed, grj°dONLNdÚ∞‚º) een, blue, °dONLNd˝ºñ»Õ(≈ñ cyan, yellow[¿°dONLNd    ºÕ»K)7, magenta, white, and black. °dONLNd'—äÿè(◊än
  792. °dONLNd)Œñ⁄) The printer may print some lar∫`°dONLNdGŒ⁄)à7ge patterns at half or smaller sizes, depending on its °dONLNd~⁄ñÊô(„ñrE°dONLNd⁄öÊ«) esolution. °dONLNdãÔäˆè(ıän
  793. °dONLNdçÏñ¯F) %Polygons and smoothed polygons that r     °dONLNd≤ÏG¯Ç)±esult in the cré°dONLNd¡Ïǯ—);eation of paths lar‡°dONLNd‘Ï“¯    )Pger than the °dONLNd·¯ñ(ñUlimit of the PostScript printer (typically 1500 or 3000, depending on the version of °dONLNd6ñÃ* PostScript) rʇ°dONLNdCÃ2)6esult in a PostScript err(`°dONLNd\3<)gor” °dONLNd^;=).°dONLNd`ä"È(äAlthough the LaserWUİdONLNdsÈ" )_
  794. riter is rİdONLNd} "Z)#elatively fast, ther”@°dONLNdëZ"j)Ne ar·‡°dONLNdïj")%e some techniques an application can °dONLNd∫"ä.ø(+ä use to ensurÈ¿°dONLNdΔ"ø.>)5e its maximum performance.°dONLNd·7ä>è(=än
  795. °dONLNd„4ñ@) WPrinting patterns takes time, because the bitmap for the pattern has to be built.  The °dONLNd:@ñL    * Tpatterns black, white, and some of the gray patterns have been optimized to use the °dONLNdéLñX¸* PostScript gray scales.  °dONLNd®^äj«(gäBRemember that when your application sends a document to the LaserWSİdONLNdÍ^«j˚(g«riter printerú‡°dONLNd˜^˙j)3, it °dONLNd¸jävm(sä1must use immediate printing and cannot use deferrå`°dONLNd-jmv˝)„"ed printing; your print code, the °dONLNdOväÇ‚(äKdocument’s data, and the printer driver have to be in memory simultaneouslyµ‡°dONLNdöv·Ç˚(·. In or†@°dONLNd°v˚Ç )der °dONLNd•ÇäéÆ(ãäto ensur\°dONLNd≠ÇÆéæ)$:e that you have enough memory available to load the LaserW¿‡°dONLNdÁÇΩéÛ(ãΩriter printer °dONLNdıéäö•(óädriverñ†°dONLNd˚é¶ö)R’s code, you should have all the code you need for printing in a separate segment °dONLNdMöä¶(£äand unload everything else. .°dONLNdj¨ä∏Ë*For information on ofR`°dONLNd¨Ë∏¯)^fscr$¿°dONLNdɨ¯∏E)een bitmaps, the $¿°dONLNdî¨E∏u)Mgrafverb$¿°dONLNdú¨u∏)0$ data type, transfer modes, and the .°dONLNd¿∏äƒç(¡ärE°dONLNd¡∏éƒÒ)outines mentioned herÍ`°dONLNd÷∏Òƒ•)c'e, see the chapter “QuickDraw”. For mor{`°dONLNd˝∏¶ƒÚ)µe information on °dONLNdƒä–‹(ÕäPostScript, see the ˚†°dONLNd"ƒ‹–G)RPostScript Language Refer¿`°dONLNd;ƒH–|)l ence Manualfi‡°dONLNdFƒ|–≤)4, available fr(`°dONLNdTƒ≥–√)7om ìİdONLNdWƒ√–ˆ)    Addison-Wg`°dONLNd`ƒˆ– )3esleyì`°dONLNdeƒ –). 
  796. ıH˚4ˆH˚ ˆäˆ
  797. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNdh‰äıô(ÒäPr· °dONLNdj‰ôıÀ)(oviding Names of Documents Being Printedˇˇˇˇˇˇ®(Ò1
  798. °dONLNdì˚ä'(ä$Some printers (usually those that arÁ°dONLNd∑˚'A)ùe shar°dONLNdΩ˚BÙ)&ed between many users, like the LaserWâ°dONLNd„˚Û)±riter °dONLNdÈä (äprinter) can prâ¿°dONLNd¯ i)@#ovide the names of the users who ar√†°dONLNdi )ü$e printing and the documents that ar£†°dONLNd? )¢e °dONLNdAä(äbeing printed to others interµÄ°dONLNd^t)|ested in using the printer˜¿°dONLNdxtÇ)n. PrΔ`°dONLNd|É)oviding the names of users and °dONLNdõä+((äUdocuments is a courtesy to other users on the network. The Printing Manager gets the °dONLNd+ä75* %name of the document being printed frŸ°dONLNd    +57è)´om the title on the fr‹ °dONLNd    ++è7˚)Zontmost window on the .°dONLNd    A7äCú(@äuser=`°dONLNd    E7ùC≤)’s scr¿°dONLNd    K7≤C⁄)    een. The ¿°dONLNd    T7⁄C)(    PrOpenDoc¿°dONLNd    ]7C%)6 and ¿°dONLNd    b7%Ca)
  799. PrValidate¿°dONLNd    l7aCm)< pr‚ °dONLNd    o7lCâ) ocedur¥Ä°dONLNd    u7âC∫) es call the ¥Ä°dONLNd    Å7∫C¸)1 FrontWindow¥Ä°dONLNd    å7¸C˛)B .°dONLNd    çCäOì(LäprG °dONLNd    èCîO≤)
  800. ocedurfi`°dONLNd    ïC≤O@)!e to get the document’s name.    °dONLNd    ∑Uäa(^äSThe Printing Manager can’t get a document name if your application doesn’t display °dONLNd
  801.  
  802. aäm* Uwindows while printing. For example, many applications do not open windows for their °dONLNd
  803. _mäy"* !documents when the user prints frfi‡°dONLNd
  804. Äm"y`)òom the Finderi@°dONLNd
  805. çm`yÄ)>    . If ther>°dONLNd
  806. ñmÄy•) 
  807. e is no fr ¿°dONLNd
  808. †m¶y‹)&
  809. ont window$°dONLNd
  810. ™m€y)5 , or if the °dONLNd
  811. ∂yäÖÚ(Çäwindow’s title is emptyó@°dONLNd
  812. ÕyÒÖ∑)g,, the Printing Manager defaults to “Unspecifi.†°dONLNd
  813. ˙y∏Ö )«ed.”°dONLNd
  814. ˇãäóê(îäY@İdONLNd ãêó») ou can ensur¢‡°dONLNd ã»ó)8He that the document name is available by putting up a window containing °dONLNd Tó䣀(†äa message like “PrhİdONLNd fó€£)QCess Command–period to cancel printing,” and give it the document’s ˇˇ.°dONLNd ©£äØ (¨äNtitle. If the window is one that doesn’t have a title bar (like those of type ˇ˝°dONLNd ˜£ Ø˙(¨ dBoxProcˇˇ°dONLNd ˇ£˙Ø)0), this .°dONLNd ØäªØ(∏äDtitle is not displayed. If you don’t want to put up a visible windowã`°dONLNd KØØª·(∏Ø , you can cr°dONLNd WØ‚ª)3 eate a tiny ˇ!"@ˇ ˇˇˇˇ@
  815. ˇ·ˇ‚7^
  816. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  817. (‡*1 )-c)28    )9Using the Printing Manager*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  818. ˇˇ∞.°dONLNd\lh‰(elwindow (for instance, type ,
  819. Courierˇˇ@°dONLNd\Âh)y    plainDBoxˇˇ∞@°dONLNd$\h¯)63) and hide it behind the menu bar by giving it the .°dONLNdWhltù(ql global coor}@°dONLNdbhùtY)1,dinates of (1,1,2,2). See the chapter “The WÆ¿°dONLNdéhYt≤)ºindow Manager” in İdONLNd†h≥tÕ)ZInside °dONLNdßtlÄô(}l
  820. Macintosh:.İdONLNd±tôÄõ)- .İdONLNdºtõÄŒ) Macintosh Ta°dONLNd«tŒÄÁ)3oolbox.°dONLNdÕtËÄL) for information about °dONLNd‰tLÄ|)ddBoxProc°dONLNdÏt|Äë)0 and °dONLNdÒtëÄ«)    plainDBox°dONLNd˙t«ÄÔ)6 window .°dONLNdÄlåà(âltypes. 
  821. ô*¶¯4ö*•¯°dONLNdˇˇ*NOTE
  822. ˇ·ˇ‚7^
  823. °dONLNd
  824. £lØ.* +Do not set the document name in the print rX`°dONLNd5£.Ø@)¬ecorÿ°dONLNd9£@ØU)d dir1†°dONLNd>£VØj)ectly    †°dONLNdC£jØè)
  825. . Not all °dONLNdMØlªÌ(∏lprinter drivers support this fi¸ °dONLNdlØÌª)Å    eld, and ÿ†°dONLNduتõ)&Apple does not guarantee that °dONLNdìªl«ñ(ƒl
  826. internal fi~‡°dONLNdûªó«)+elds of the Printing Manager¡°dONLNd∫ª«@) ’s data strÅ`°dONLNd≈ªA«X)+uctur@°dONLNd ªY«|)    es will r„°dONLNd”ª{«ò)"emain °dONLNdŸ«l”ï(–l    the same.,Zapf Dingbats8°dONLNdˇˇ)-u
  827. ܰdONLNdˇˇ) 
  828. ˘*ˇ¯4˘*˛¯ ˘l˘¯
  829. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd¯Ál¯i(Ùl$Canceling or Pausing the Printing Pr£@°dONLNdÁi¯ç)˝ocessˇˇˇˇˇˇ®)á1
  830. °dONLNd"˛l
  831. ∑(lIf you install a pr °dONLNd5˛∏
  832. ÷)Locedur¶`°dONLNd;˛÷
  833. )e for handling r`¿°dONLNdK˛
  834. ‡)E.equests to cancel printing, do not include an °dONLNdy
  835. lÙ(loption to pause the printing prè@°dONLNdò
  836. Ùñ)à#ocess. Pausing may cause timeout pr~‡°dONLNdª
  837. ñ”)¢ oblems when °dONLNd«l"–(lprinting to the LaserW&†°dONLNd›–")driter printerp°dONLNdÍ"Î)30.  Communication between the Macintosh computer °dONLNd"l.±(+land the LaserW¢ °dONLNd("±.6)Eriter must be maintained to prï¿°dONLNdF"6.÷)Ö'event a job or a wait timeout.  If ther¸‡°dONLNdm"÷.Ù)†e is no °dONLNdu.l:Ê(7lUcommunication for a period of time (over two minutes), the printer times out and the °dONLNd :lFc* 9print job terminates due to a wait timeout.  Because therÕ`°dONLNd:cFÎ)˜e is no good way to determine °dONLNd!FlRº(Olthe type of printer3¿°dONLNd4FºR)P, you should be awarª‡°dONLNdHFR†)\ e of the possibility of a LaserW9İdONLNdhF†Rˆ)àriter printer timing °dONLNd}Rl^è([lBout for a user who wants to pause printing for over two minutes.  
  838. Ñ*ä¯4Ñ*⯠Ñlѯ
  839. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd¿rlÉ*$Handling Printing Err;P°dONLNd’rÉ)ôorsˇˇˇˇˇˇ®)Î1
  840. .°dONLNdŸâlïs(ílYï°dONLNd⁄ârï˚)ou should always check for errg`°dONLNd¯â˚ïº)â,or conditions while printing by calling the g`°dONLNd$âºïÊ)¡PrErrorg`°dONLNd+âÊïË)* .°dONLNd,ïl°§(ûlfunction. Erra†°dONLNd9ï§°∏)8ors rK¿°dONLNd>ï∏°)eturned may include ㇰdONLNdRï°7)^AppleT? °dONLNdXï7°π)!alk and Operating System err6`°dONLNdtïπ°‘)Çors in °dONLNd{°l≠¸(™l addition to Printing Manager err‡°dONLNdõ°˝≠)ëors..°dONLNd†≥løõ(ºl Don’t call °dONLNd´≥õø≈)/PrError°dONLNd≤≥≈øœ)* frR`°dONLNdµ≥œø5)
  841. om within your idle pr$¿°dONLNdÀ≥5øR)focedur˜ °dONLNd—≥Qøm)e. See ˜ °dONLNdÿ≥mø})“W9¿°dONLNd⁄≥}ø≈)riting an Idle Pr  °dONLNdÎ≥≈ø‚)HocedurfiİdONLNdÒ≥·øÌ)e” .°dONLNdÙølÀô(»l
  842. on page 1-u†°dONLNd˛øöÀ§).25u†°dONLNdø§À«)
  843.  for mor@ °dONLNdø»À    )$e information. °dONLNd—l›Ê(⁄lIf you determine that an err¢@°dONLNd4—Ê›)zor has occurr-İdONLNdA— ›Δ):'ed after the completion of a printing rj`°dONLNdh—Δ›Á)¶outine, °dONLNdp›lÈÎ(Êlstop printing. Call the close r†°dONLNdè›ÏÈt)Äoutine that matches any open r懰dONLNd≠›tÈÓ)àoutine you have called. For .°dONLNd…Èlı»(Úlexample, if you call °dONLNdfiÈ»ı˛)\    PrOpenDoc°dONLNdÁÈ˛ı)6 and rR`°dONLNdÌÈıV)eceived an err$¿°dONLNd˚ÈVı_)?org`°dONLNd˝È^ı´), skip to the next g`°dONLNdÈ´ıÁ)M
  844. PrCloseDocg`°dONLNdÈÁıˆ)<; if °dONLNdılù(˛l you called °dONLNd*ıùŸ)1
  845. PrOpenPage°dONLNd4ıŸ)< and got an errR`°dONLNdCı!)?orï°dONLNdEı m), skip to the next ï°dONLNdXımØ)M PrClosePageï°dONLNdcı؃)B and ˇˇ‹Æ°dONLNdhl®(
  846. l
  847. PrCloseDocˇˇÙ:°dONLNdr®Ç)</. Remember that if you have called some open prËj°dONLNd°Çü)⁄ocedur∫ °dONLNdßü˜)e, you must call the .°dONLNdºl}(lcorr`°dONLNd¿~⁄)esponding closing prÏ¿°dONLNd‘⁄¯)\ocedurѰdONLNd⁄˘$)
  848. e to ensur©†°dONLNd‰$µ)+#e that the printer driver closes prܰdONLNdµÁ)ë operly and °dONLNdl%!("l(that all temporary memory allocations arÖ‡°dONLNd:!%,)µe rîİdONLNd=,%f) eleased and r‰†°dONLNdJf%¡):eturned to the heap. 
  849. D*K¯4D*J¯ ElE¯
  850. ˇ·ˇ‚7^ °dONLNd`6lDé(@lUsing ûİdONLNdf6éDH)"#Alert or Dialog Boxes to Report ErrºÄ°dONLNdâ6HDX)∫orsˇˇˇˇˇˇ)™1
  851. °dONLNdçPl\.(Yl-Do not display any alert or dialog boxes to r¿¿°dONLNd∫P.\a)¬ eport an err↰dONLNdΔPb\Î)4!or until the end of the printing °dONLNdÁ\lh(el)loop.  Once at the end, check for the err∏`°dONLNd    \h\)≠or again; if therH°dONLNd    !\]hà)D e is no err °dONLNd    ,\àhÚ)+or assume that printing °dONLNd    Dhlt≈(qlcompleted normallyÁ@°dONLNd    VhƒtÒ)X.  If the errx@°dONLNd    chÚt$).or is still prÖ`°dONLNd    qh$tµ)2"esent, then you can alert the userχ°dONLNd    ìh¥tŒ)ê. This °dONLNd    ötlĢ(}l technique is important for two r£@°dONLNd    ∫t˘Ä)ç    easons.  °dONLNd    ƒÜlíÌ(èl]First of all, if you display a dialog box in the middle of the printing loop, it could cause °dONLNd
  852. !ílûx* err@°dONLNd
  853. $íyû€)Sors that can terminate an otherwise normal job.  For example, if the printer is an °dONLNd
  854. wûl™ç(ßlAppleT3@°dONLNd
  855. }û癪)! alk printerİdONLNd
  856. àûª™).E, the connection can be terminated abnormally since the driver would °dONLNd
  857. Õ™l∂®(≥lbe unable to r‡@°dONLNd
  858. €™®∂÷)<
  859. espond to • °dONLNd
  860. ™÷∂˜).AppleTX`°dONLNd
  861. Ι˜∂
  862. )!alk r‡°dONLNd
  863. ™ ∂2)    equests rI¿°dONLNd
  864. ˘™2∂])'
  865. eceived frZ °dONLNd ™]∂È)+ om the printer while the dialog ˇ!ö@ˇ ˇˇˇˇ@
  866. ˇ·ˇ‚7^
  867. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  868. ~¿(‡1‡)-a¿)29(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  869. °dONLNd\äh(eäbox was waiting for input fr^†°dONLNd\h:)| om the user»Ä°dONLNd'\9h¿)3".  If the printer does not hear frM°dONLNdI\¡h)àom the Macintosh °dONLNdZhätW(qä-system within a short period of time (anywher‰°dONLNdáhWte)Õe frFİdONLNdãhft‰)om 30 seconds to 2 minutes, °dONLNdßtäÄÌ(}äPdepending on the driver), it assumes that the Macintosh system is no longer ther `°dONLNd˜tÌÄ(}Ìe and °dONLNd˝ÄäåÙ(âätimes out. The timeout rÃİdONLNdÄÙå,)jesults in a prB‡°dONLNd#Ä-åL)9ematurÔ°dONLNd)ÄLåe)ely br¸¿°dONLNd/Äeå˚)!oken connection, causing another °dONLNdPåäòñ(ïäerr@°dONLNdSåóò†)or¨°dONLNdUåüò.)!, to which the application must rͰdONLNdvå.òh)èespond. (See ¸@°dONLNdÉåhò):#“Canceling or Pausing the Printing °dONLNd¶òä§ì(°äPrN†°dONLNd®ò)
  870. ocess” on page 1-̆°dONLNdπò‡§Í)L28̆°dONLNdªòͧÔ)
  871. .)°dONLNdæ™ä∂¬(≥ä The second r⁄@°dONLNd ™¬∂b)8%eason is that the driver may have alr´†°dONLNdÔ™c∂)°%eady displayed its own dialog box in °dONLNd∂ä¬ç(øärE°dONLNd∂鬟)esponse to an err%¿°dONLNd&∂Ÿ¬‚)Kor–İdONLNd(∂·¬í),.  In this instance, the driver posts an errª °dONLNdT∂í¬˚)±or to let the application °dONLNdn¬äŒ(Àäknow that something went wr@°dONLNd⬌)Ü:ong and it should cancel printing.  For example, when the °dONLNd√Œä⁄¨(◊äLaserW◊†°dONLNd…Œ´⁄H)!&riter driver detects that the Laser Pr†°dONLNdÔŒI⁄ )û+ep version that has been downloaded to the °dONLNd⁄äʨ(„äLaserW◊†°dONLNd ⁄´Ê÷)! riter is dif°dONLNd,⁄◊Ê„),fer„İdONLNd/⁄‚Ê˘) ent frY¿°dONLNd5⁄˙Ê)@om that with which the user is trying to print, it displays the °dONLNduÊäÚû(ÔäapprI@°dONLNdyÊüÚ)Vopriate dialog box informing the user of the situation and giving the user the option °dONLNdœÚä˛ô(˚äof ré`°dONLNd”Úô˛ˇ)einitializing the printer †°dONLNdÏÚˇ˛)f?.  If the user chooses to cancel printing, the driver posts an °dONLNd+˛ä
  872. ñ(äerr@°dONLNd.˛ó
  873. )Zor to let the application know that it needs to cancel printing, but since the driver has .°dONLNdà
  874. äò(äalrR`°dONLNdã
  875. ò€)eady taken car$¿°dONLNdô
  876. € )C e of the err˜ °dONLNd•
  877.  ≤)0&or by displaying a dialog box, the err…İdONLNdÀ
  878. ≤À)ßor is rõ‡°dONLNd“
  879. ÀÍ)eset to ,
  880. Courierõ‡°dONLNd⁄
  881. Í)0õ‡°dONLNd€
  882.     ) beforn@°dONLNd·
  883.     )e .°dONLNd„ä"¡(äHthe printing loop is complete.  The application should check for the err≤‡°dONLNd+¡"(¡or again at the °dONLNd;"ä.s(+ä:end of the printing loop, and if it still indicates an errC °dONLNdu"t.})Íoṙ°dONLNdw"|.)#, the application can then display °dONLNdö.ä:Ø(7äthe appr¶†°dONLNd¢.Ø:)%opriate dialog box.
  884. XH_4YH_ ZäZ
  885. ˇ·ˇ‚7^ °dONLNd∂KäYØ(UäInterpr¶¿°dONLNdΩKØY)%eting PrGeneral Err‡@°dONLNd–KY&)gorsˇˇˇˇˇˇ)˙1
  886. .°dONLNd‘eäq∞(nä    If you arR`°dONLNd›e∞q‚)& e using the R`°dONLNdÈe‚q)2    PrGeneralR`°dONLNdÚeq$)6 pr$¿°dONLNdıe$qA) ocedur˜ °dONLNd˚e@q`)e, be pr…İdONLNde`qu) eparõ‡°dONLNdeuqë)ed to rn@°dONLNdeëq˝)eceive the following err@†°dONLNd&e˝q)lors:  ˇˇKd°dONLNd,qä}¿(zä    noSuchRslˇˇ√ðdONLNd5q¿}ƒ)6, ˇˇKdCðdONLNd7q≈}˚)    opNotImplˇˇ√ÃCðdONLNd@q˚})6, and ˇˇKdÀd°dONLNdFq}T) resNotFoundˇˇ√ÃÀd°dONLNdQqT}Ñ)B.  In all thr¨Ù°dONLNd^qÑ})0!ee cases, the application should .°dONLNd}äâ†(Üäbe pr`°dONLNdÑ}°â¥)epar© °dONLNdà}¥âÑ)0ed to continue to print without using the featur†°dONLNd∏}Öâ)—es of that particular opcode..°dONLNd÷èäõû(òäThe °dONLNd⁄èûõ‡) resNotFound°dONLNdÂè‡õÔ)B errR`°dONLNdÈèÔõ;)or means the curr$¿°dONLNd˙è;õË)L(ent printer driver does not support the °dONLNd"õäß¿(§ä    PrGeneral°dONLNd+õ¿ßÃ)6 prR`°dONLNd.õÃßÈ) ocedur$¿°dONLNd4õÈ߆)+e.  This lack of support should not be a pr˜ °dONLNd_õüß·)∂oblem for your .°dONLNdnßä≥(∞ä"application, but you need to be pr‰`°dONLNdêß≥2)ïeparu °dONLNdîß3≥ó)ed to deal with this errm†°dONLNd¨ßó≥†)dor`°dONLNdÆß†≥»)     .  If you rİdONLNdπß»≥Ì)(    eceive a .°dONLNd¬≥äøÃ(ºä resNotFound°dONLNdÕ≥Ãø“)B rR`°dONLNdœ≥“ø)esult code fr$¿°dONLNd‹≥ø)6om $¿°dONLNdfl≥øA)PrErrorg`°dONLNdÊ≥@ø})), clear the err9¿°dONLNdı≥}ø»)=or with a call to 9¿°dONLNd≥»ø)K
  887. PrSetError9¿°dONLNd≥ø)< ˇˇR⁄°dONLNdøäÀX(»ä/with a value of 0 as the parameter; otherwise, ˇ˝¯éi™°dONLNdAøYÀÉ)œPrErrorˇˇR⁄i™°dONLNdHøÉÀ˙)* might still contain this err⁄L°dONLNdeø˙À)wor the .°dONLNdlÀä◊7(‘ä&next time you check it, which would prÄ¿°dONLNdíÀ7◊§)≠event your application fr °dONLNd´À•◊‹)n om printing.
  888. ‹H˜4›H˜
  889. H4    H     H    
  890. ˇ·ˇ‚7^ˇˇ£‰ˇÆ°dONLNd∏ıHó(H    Referenceˇˇˇˇˇˇ⁄|( 1
  891. °dONLNd¬ä$(!ä#This section describes the data strï`°dONLNdÂ$5)îuctur@°dONLNdÍ6$G)es, rʇ°dONLNdÔG$É)outines, and rò`°dONLNd˝Ñ$ú)=esour‡†°dONLNd    ú$µ)ces prû†°dONLNd    ∂$ı)ovided by the °dONLNd    $ä0ÿ(-äPrinting Manager‡°dONLNd    &$ÿ0›)N. °dONLNd    )6äBΔ(?äThe “Data Strú °dONLNd    66ΔB›)<uctur"°dONLNd    ;6fiB~)%es” section shows the Pascal data stra¿°dONLNd    `6~Bï)†ucturÁ†°dONLNd    e6ïB¸)es used by the Printing °dONLNd    }BäN±(KäManagerT†°dONLNd    ÑB±N^)'(. The “Routines” section describes the rDİdONLNd    ¨B^N)≠)outines you can use to print a document, °dONLNd    ’NäZì(WäprG °dONLNd    ◊NîZù)
  892. =oduce or alter a printing dialog box, and handle printing errQ¿°dONLNd
  893. NùZØ(Wùors. 
  894. áHè4àHè àHà
  895. ˇ·ˇ‚7^ˇˇ◊ˇ◊°dONLNd
  896. vHáÄ(ÉHData Str¢Ä°dONLNd
  897. "vÄá•)8uctur|–°dONLNd
  898. 'v•á≥)%esˇˇˇˇˇˇ®(É1
  899. °dONLNd
  900. *ìäüæ(úä The data str˜‡°dONLNd
  901. 6ìæü’)4uctur}¿°dONLNd
  902. ;ì÷üº)5es of the Printing Manager primarily fall into two gr{@°dONLNd
  903. pìºüÎ)Ê oups: the rY`°dONLNd
  904. {ìÎü˝)/ecorÕ¿°dONLNd
  905. ì˝ü    )ds .°dONLNd
  906. Çüä´Ø(®äand subrR`°dONLNd
  907. äüØ´¡)%ecor$¿°dONLNd
  908. éü¡´)ds of the print r˜ °dONLNd
  909. üü´)Eecor…İdONLNd
  910. £ü´L) d, and the rõ‡°dONLNd
  911. ØüL´^)4ecorn@°dONLNd
  912. ≥ü^´ü)ds used by the n@°dONLNd
  913. ¬üü´’)A    PrGeneraln@°dONLNd
  914. Àü’´·)6 pr@†°dONLNd
  915. Œü·´˛) ocedur°dONLNd
  916. ‘ü˛´)e. ˇR@ˇ ˇˇˇˇ@
  917. ˇ·ˇ‚7^
  918. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  919. (‡*1 )-c)30    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  920. °dONLNd\lhŒ(elIn almost all cases, a fiÚİdONLNd\Œhâ)b+eld in one of the Printing Manager data str¿†°dONLNdD\äh°)ºucturFİdONLNdI\¢hÒ)es that is listed as °dONLNd^hltã(qlbeing r_ °dONLNdehãtb)/eserved contains device-dependent information. )°dONLNdîhcti)ÿYÈİdONLNdïhht¨)ou should not r√İdONLNd§h¨t‹)D ely on this °dONLNd∞tlÄe(}l8information being available or accurate when printing frjİdONLNdËteÄ√)˘om your application. 
  921. §*¨¯4•*¨¯ •*•˛
  922. ˇ·ˇ‚7^ °dONLNd˛ó*•Q(°*TPrint  7¿°dONLNdóR•U)( ˇˇˇˇˇˇ(°Ú1
  923. .°dONLNd¨l∏Ä(µlThe ,
  924. Courier°dONLNd ¨Ä∏§)TPrint°dONLNd¨§∏™)$ rR`°dONLNd¨™∏º)ecor$¿°dONLNd¨º∏˝)d is the print r˜ °dONLNd(¨¸∏)@ecor…İdONLNd,¨∏Ω)%d that every document must have beforõ‡°dONLNdQ¨Ω∏Á)Ø
  925. e you can °dONLNd[∏lƒã(¡lCprint it. It contains handles to the print information and job subrR`°dONLNdû∏ãƒù(¡ãecor$¿°dONLNd¢∏ùƒ≠)ds ($¿°dONLNd¶∏≠ƒ◊)TPrInfo$¿°dONLNd≠∏◊ƒ‹)*, °dONLNd؃l–•(Õldescribed on °dONLNdºƒ•–Δ)9page 1-°dONLNd√ƒΔ––)!31°dONLNd≈ƒ––Â)
  926.  and °dONLNd ƒÂ–    )TPrJob°dONLNd–ƒ    –G)$, described on °dONLNdflƒG–h)>page 1-°dONLNdʃh–r)!31°dONLNd˃r–{)
  927. ). °dONLNdÏ‹lËΔ(ÂlTPrint = RECORD°dONLNdÍ~ˆˆ+iPrVersion: Integer;°dONLNd͸ˆ§)~{ Printing software version}°dONLNd<¯~fi(~prInfo: TPrInfo;°dONLNdRêŒ+5{ the PrInfo data associated with the current style.}°dONLNdå~ Ã(~rPaper: Rect;°dONLNdüÍ Ê)l*{ The paper rectangle [offset from rPage]}°dONLNdŒ"~.“(+~prStl: TPrStl;°dONLNd‚"Í.§)l{  This print request's style.}°dONLNd0~<Í(9~prInfoPT: TPrInfo;°dONLNd0Í<>)l  { Reserved }°dONLNd/>~JÍ(G~prXInfo: TPrXInfo;°dONLNdGLêXò+,{  Print-time (expanded) Print info record.}°dONLNdxZ~f“(c~prJob: TPrJob;°dONLNdåhêtò+,{ The Print Job request  Total of the above;°dONLNdævêÇn*%120-82 = 38 bytes needed to fill 120}°dONLNdËÑ~êD(ç~!printX: ARRAY [1..19] OF Integer;°dONLNdíêû>+{Spare to fill to 120 bytes!}°dONLNd1†~¨ñ(©~END;
  928. ª*À¯4º* ¯    .°dONLNdˇˇ(√lField descriptions
  929. ˇ·ˇ‚7^
  930. .°dONLNd6»l‘®*
  931. iPrVersion.°dONLNdA»»‘Ÿ)\@The version of the Printing Manager that initialized this print .°dONLNdÅ‘»‡Ã* rR`°dONLNdǑÇfi)ecor$¿°dONLNdÜ‘fi‡)
  932. d. It is r˜ °dONLNdꑇÜ)"ecommended that you use the ˜ °dONLNd¨‘܇¬)Ü
  933. PrDrvrVers˜ °dONLNd∂‘¬‡Í)<
  934.  function .°dONLNd¿‡»ÏÀ(È»(”‡°dONLNd¡‡ÀÏÎ)page 1-†°dONLNd»‡Ïψ)!58†°dONLNd ‡ˆÏ±)
  935. +) instead if you want to determine the curr'`°dONLNdı‡±ÏÔ)ªent version of °dONLNdÏ»¯˜(ı»Ethe printer driver; your application may not have updated this print °dONLNdI¯»À* rE°dONLNdJ¯Ãfi)ecorπ`°dONLNdN¯fi)d for the currİdONLNd\¯H); ent printerj†°dONLNdg¯GS)..    .°dONLNdmlê(lprInfo.°dONLNdt»±)\3The information needed for page composition. This r†°dONLNdß≤ƒ)Íecorç°dONLNd´ƒ˜)d is of type .°dONLNd∏»Ú(»TPrInfo°dONLNdøÚZ)*, which is described on °dONLNd◊Z{)hpage 1-°dONLNdfi{Ö)!31°dONLNd‡Öà)
  936. .°dONLNd‚"l.ê(+lrPaper.°dONLNdÈ"».˚)\ The paper r¡@°dONLNdÙ"˚.>)3ectangle. This r¨Ä°dONLNd">.Õ)Cectangle encompasses the page r°dONLNd#"Œ.˜)ê
  937. ectangle, .°dONLNd-.»:(7»which is specifi°dONLNd=.:<)H
  938. ed by the °dONLNdG.<:Z),rPage°dONLNdL.Z:c) fi°dONLNdO.c:Î)    eld of the printer information .°dONLNdn:»FÀ(C»rE°dONLNdo:ÃFfi)ecorπ`°dONLNds:fiF$)d, described on ˆ†°dONLNdÉ:$FD)Fpage 1-%`°dONLNdä:EFO)!31%`°dONLNdå:OFQ)
  939. ..°dONLNdéIlUä(RlprStl.°dONLNdîI»U˘)\ The printer&@°dONLNdüI˚U÷)31’s device number and the feed type, described on T‡°dONLNd–I÷UÌ)€page °dONLNd’U»a–(^»1-”‡°dONLNd◊U–a⁄)33”‡°dONLNdŸU⁄a‹)
  940. ..°dONLNd€dlpú(mlprInfoPT.°dONLNd‰d»p)\ Reserved by 4‡°dONLNddp!)9Apple. .°dONLNd¯slñ(|lprXInfo.°dONLNds»)\ Reserved by 4‡°dONLNd s!)9Apple. .°dONLNdÇléä(ãlprJob.°dONLNdÇ»é¨)\5Information about this particular printing job. The r±Ä°dONLNdOǨéÛ)‰esults of the job .°dONLNdaé»ö^(ó»$dialog box sets its contents. This rR`°dONLNdÖé^öp)ñecor$¿°dONLNdâépö§)d is of type $¿°dONLNdñé§ö»)4TPrJob$¿°dONLNdúé»ö˜)$ , which is .°dONLNdßö»¶(£»described on °Ä°dONLNd¥ö¶#);page 1-–@°dONLNdªö#¶-) 31–@°dONLNdΩö-¶2)
  941. . .°dONLNd¿©lµê(≤lprintX.°dONLNd«©»µ)\ Reserved by 4‡°dONLNd”©µ)9Apple.ˇΔ@ˇ ˇˇˇˇ@
  942. ˇ·ˇ‚7^
  943. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  944. ~¿(‡1‡)-a¿)31(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  945. °dONLNd\ähˆ(eäIf you try to use a print r˝¿°dONLNd\ˆh)lecorr °dONLNd\    hÄ)d that’s invalid for the curr} °dONLNd<\Ähˆ)went version of the Printing °dONLNdXhätÒ(qäManager or for the currBİdONLNdohÚtQ)hently installed printerv`°dONLNdÜhQt‹)_ , the Printing Manager will corr‘İdONLNd¶h‹t˚)ãect the °dONLNdÆtäÄç(}ärE°dONLNdØtéĆ)ecorπ`°dONLNd≥t†Äº)d by fi¯†°dONLNd∫tºÄ5)lling it with default values. °dONLNdŸÜäíê(èäY@İdONLNd⁄ÜêíV)/ou should not alter the contents of the print rä`°dONLNd    ÜVíh)Δecor˛¿°dONLNdÜhí})d dirc†°dONLNdÜ~íí)ectly;†°dONLNdÜííó). 
  946. ∂Hæ4∑Hæ ∑H∑
  947. ˇ·ˇ‚7^ °dONLNd©H∑s(≥HTPrInfo gİdONLNd"©t∑z),  ˇˇˇˇˇˇ(≥1
  948. .°dONLNd%æä û(«äThe ,
  949. Courier°dONLNd)æû »)TPrInfo°dONLNd0æ» Œ)* rR`°dONLNd2挠‡)ecor$¿°dONLNd6懠p)!d is the printer information subr˜ °dONLNdWæo Å)èecor…İdONLNd[æÅ √)d of the print rõ‡°dONLNdkæ√ ’)Becorn@°dONLNdoæ’ )d. It contains .°dONLNd~ ä÷(”äthe vertical and horizontal rà‡°dONLNdõ ÷ò){"esolutions of the printer and coorÑ`°dONLNdΩ ò÷Ó)ìdinates of the page °dONLNd—÷ä‚ç(flärE°dONLNd“÷é‚∑)
  950. ectangle. .°dONLNd›Óä˙Í(˜äTPrInfo = RECORD°dONLNdÚ¸ú+iDev: Integer;°dONLNd¸»)l {Font mgr/QuickDraw device code}°dONLNd+
  951. úˆ(úiVRes: Integer;°dONLNd@
  952. )l-{Resolution of device, in device coordinates}°dONLNdrú$ˆ(!úiHRes: Integer;°dONLNdá&Æ2¬+.{..note: V before H => compatable with Point.}°dONLNd∫4ú@‰(=ú rPage: Rect;°dONLNdÀBúNÊ*7{The page (printable) rectangle in device coordinates.}°dONLNdPú\¥*END;
  953. kH{4lHz    .°dONLNdˇˇ(säField descriptions
  954. ˇ·ˇ‚7^
  955. .°dONLNd xäÑ¢*iDev.°dONLNdxÊÑ)\ Reserved by 4‡°dONLNdxÑ<)9Apple..°dONLNd$áäì®(êäiVRes.°dONLNd*áÊì)\ The printer&@°dONLNd5áìI)3’s vertical r’`°dONLNdBáIì)0.esolution in dots per inch. The default value .°dONLNdpìÊüú(úÊ*is 72, unless you have made a call to the °dONLNdöìúü“)∂    PrGeneral°dONLNd£ì“üfi)6 prR`°dONLNd¶ìfiü˚) ocedur$¿°dONLNd¨ì˚ü)e ˇˇ«°dONLNdÆüÊ´(®Ê    with the ˇˇUT8°dONLNd∑ü´5)+SetRslˇˇ«8°dONLNdΩü5´ì)$ opcode (described in *®°dONLNd”üì´)^“Determining the Resolution .°dONLNdÔ´Ê∑(¥Ê of the Curr¸Ä°dONLNd˙´∑z)0ent Printer” on page 1-Ñ °dONLNd´{∑Ö)e17Ñ °dONLNd´Ö∑ç)
  956. ). .°dONLNd∫äΔ®(√äiHRes.°dONLNd∫ÊΔ)\ The printer&@°dONLNd(∫ΔV)3’s horizontal rɰdONLNd7∫VΔ)=(esolution in dots per inch. The default .°dONLNd_ΔÊ“∏(œÊ0value is 72, unless you have made a call to the °dONLNdèΔ∏“Ó)“    PrGeneral°dONLNdòΔÓ“)6 °dONLNdô“Êfi(€ÊprR`°dONLNdõ“fi)
  957. ocedur$¿°dONLNd°“fi?) e with the $¿°dONLNd¨“?fio)2SetRslOp$¿°dONLNd¥“ofiï)0     opcode. °dONLNdæ·äÌ®(ÍärPage.°dONLNdƒ·ÊÌ)\
  958. The page r[†°dONLNdŒ·ÌX)/ectangle. This rF‡°dONLNdfi·XÌ÷)Cectangle is inside the paper r¢`°dONLNd¸·÷Ìˇ)~
  959. ectangle, .°dONLNdÌÊ˘(ˆÊspecifi°dONLNdÌ˘0)
  960. ed by the °dONLNdÌ0˘T),rPaper°dONLNdÌT˘])$ fi°dONLNd Ì]˘®)    eld of the print rR`°dONLNd2Ì®˘∫)Kecor$¿°dONLNd6Ì∫˘˛)d, described on $¿°dONLNdFÌ˛˘)Dpage .°dONLNdK˘ÊÓ(Ê1-”‡°dONLNdM˘Ó¯)30”‡°dONLNdO˘¯õ)
  961. (. The style dialog box sets this value. 
  962. *H24*H1 *H*
  963. ˇ·ˇ‚7^ °dONLNdxH*o(&HTPrJob °dONLNdp*s)( ˇˇˇˇˇˇ(&1
  964. .°dONLNdÅ1ä=û(:äThe °dONLNdÖ1û=¬)TPrJob°dONLNdã1¬=÷)$ subrR`°dONLNdê1÷=Ë)ecor$¿°dONLNdî1Ë=)    d of the $¿°dONLNdù1=1)%TPrint$¿°dONLNd£11=P)$ print r˜ °dONLNd´1O=a)ecor…İdONLNdØ1a=Î)d contains information about a .°dONLNdŒ=äI˛(FäWparticular printing job. The user accepting the contents of the job dialog box or your .°dONLNd%IäUˆ* application calling the °dONLNd=IˆU>)l PrintDefault°dONLNdII>UJ)H prR`°dONLNdLIJUg) ocedur$¿°dONLNdRIgUr)e ($¿°dONLNdUIrUì) page 1-$¿°dONLNd\IìUù)!42$¿°dONLNd^IùUÎ)
  965. ) sets its contents.ˇ˙@ˇ ˇˇˇˇ@
  966. ˇ·ˇ‚7^
  967. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  968. (‡*1 )-c)32    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  969. Courier
  970. .°dONLNd\lhΔ(elTPrJob = RECORD°dONLNdj~vÍ+iFstPage: Integer;°dONLNd*jÍvˆ)l  °dONLNd0jv\)${Page Range.}°dONLNdBx~ÑÍ(Å~iLstPage: Integer;°dONLNdYÜ~í‰*iCopies: Integer;°dONLNdn܉íˆ)f   °dONLNduÜíÄ)*{Number of copies.}°dONLNdçî~†(ù~bJDocLoop: SignedByte; °dONLNd®î†»)ä  {The Doc style: Draft or Spool}°dONLNdÕ¢~Æ(´~fFromUsr: Boolean; °dONLNdË¢ÆJ)ê
  971. {Reserved}°dONLNd˜∞~º¯(π~?pIdleProc: PrIdleProcPtr; {Pointer to the background procedure}°dONLNd;æ~ ¸*pFileName: StringPtr;°dONLNdS渠‡)~&   {Spool File Name: NIL for default.}°dONLNd~Ã~ÿÍ(’~iFileVol: Integer;°dONLNdîÃÍÿ)l °dONLNdôÃÿÊ)$${Spool File vol, set to 0 initially}°dONLNd¬⁄~Ê(„~bFileVers: SignedByte;°dONLNd›Ë~Ùz**  {Spool File version, set to 0 initially}°dONLNd ˆ~Í*bJobX: SignedByte;°dONLNd"ˆÍ)l °dONLNd'ˆJ)$
  972. {Reserved}°dONLNd6~ñ(~END;
  973. */¯4 *.¯    .°dONLNdˇˇ('lField descriptions
  974. ˇ·ˇ‚7^
  975. .°dONLNd;,l8ú*iFstPage.°dONLNdD,»8:)\The page number of the fi∫İdONLNd],:8û)rrst page being printed..°dONLNdu;lGú(DliLstPage.°dONLNd~;»Gû)\0The page number of the last page being printed. .°dONLNdØJlVñ(SliCopies.°dONLNd∑J»V.)\The number of copies rë`°dONLNdÕJ.VÒ)f,equested, which is also the number of times °dONLNd˘V»bΔ(_»8your application should send the document to the printer‘İdONLNd1V≈bÛ)˝    . Howevera °dONLNd:VÛb¯)., °dONLNd<b»n‡(k»@some printer drivers handle multiple copies internally and this °dONLNd|n»z
  976. * value will be 1..°dONLNdç}lâ¢(Ül    bJDocLoop.°dONLNdó}»âÏ)\CThe printing method that the Printing Manager will use. It will be °dONLNd⁄â»ï-* one of the following pr≠‡°dONLNdÒâ-ïB)eedefii†°dONLNdˆâCïÇ)ned constants:.°dONLNd°Δ≠D(™ΔCONST bDraftLoop = 0;°dONLNd*°V≠∂)ê{draft printing}°dONLNdEØÍªD(∏ÍbSpoolLoop = 1;°dONLNdZØVª∂)l{spool printing}°dONLNdk«l”ú(–lfFromUsr.°dONLNdt«»”)\ Reserved by 4‡°dONLNdÄ«”)9Apple..°dONLNdá÷l‚¢(fll    pIdleProc.°dONLNdë÷»‚œ)\A∫†°dONLNdí÷œ‚-) pointer to the backgr[°dONLNd®÷.‚Q)_ound pr ‡°dONLNdØ÷R‚p)$ocedur£ °dONLNdµ÷p‚≥)e (described in ’°dONLNd≈÷≥‚fi)C
  977. “The Idle °dONLNdœ‚»Ó—(λPrN†°dONLNd—‚“Ó)
  978. ocedur‡°dONLNd◊‚Ó*)e” on page 1-% °dONLNd‰‚+Ó0);8% °dONLNd‚0ÓÆ)) for this printing operation. .°dONLNdÒl˝¢(˙l    pFileName.°dONLNdÒ»˝2)\The name of the spool fi¿°dONLNd'Ò2˝Z)j
  979. le. This fiG°dONLNd2Ò[˝¿))eld is initialized to NILfl¿°dONLNdKÒ¿˝fl)e and is °dONLNdS˝»    ¶(»1should not be changed by your application. This fi·`°dONLNdÖ˝¶    Î)field denotes the °dONLNdï    »Ô(»    default fiw‡°dONLNdü    Ü)($le name (normally 'Print File') stor1İdONLNd√    á—)óed in the printer °dONLNd’»!À(»rE°dONLNd÷Ã!‰)esourç@°dONLNd€‰!ı)ce fiS‡°dONLNd‡ˆ!)le..°dONLNd‰$l0ú(-liFileVol.°dONLNdÌ$»0)\ The volume r©†°dONLNd˘$0);eferU¿°dONLNd˝$0å)ence number of the spool fia°dONLNd$å0¥)x
  980. le. This fi∑@°dONLNd#$¥0Õ)(eld is °dONLNd*0»<(9»initialized to 0, r‡°dONLNd=0<)Hepr†°dONLNd@0<ü)esenting the default volume. Å@°dONLNd]0ü<•)ÄYA¿°dONLNd^0•<Ê)ou can use the .°dONLNdm<»H-(E»File Manager function °dONLNdÉ<-HQ)eSetVol°dONLNdâ<QH‡)$  (described in the File Manager .°dONLNd©H»T(Q»chapter of the È °dONLNd¬HTP)?Operating SystemɆ°dONLNd“HQT⁄)J volume) to change the default °dONLNdÒT»`Ó(]»volume. .°dONLNd˙clo¢(ll    bFileVers.°dONLNdc»o`)\!The version number of the spool fi¿‡°dONLNd&c`o∞)òle, initialized to 0. .°dONLNd=rl~ä({lbJobX.°dONLNdCr»~)\ Reserved by 4‡°dONLNdOr~)9Apple.ˇ4@ˇ ˇˇˇˇ@
  981. ˇ·ˇ‚7^
  982. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  983. ~¿(‡1‡)-a¿)33(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  984. jHq4jHq jHj
  985. ˇ·ˇ‚7^ °dONLNd\Hjl(fHTPrStl â°dONLNd\ljr)$  ˇˇˇˇˇˇ(f1
  986. .°dONLNd
  987. qä}û(zäThe ,
  988. Courier°dONLNdqû}¬)TPrStl°dONLNdq¬}»)$ rR`°dONLNdq»}⁄)ecor$¿°dONLNdq⁄}ã)(d contains the device number of the curr˜ °dONLNdBqä})∞ent printer and the feed type .°dONLNd`}äâú(ÜäcurrذdONLNdd}úâT)+ently selected (paper cassette or manual). ›†°dONLNdè}TâÉ)∏ All other fi«‡°dONLNdõ}Ñâ°)0elds ar†°dONLNd¢}¢â≠)e r&@°dONLNd•}≠â‘)     eserved. .°dONLNdØïä°‰(ûäTPrStl = RECORD°dONLNd√£úØ+wDev: Integer;°dONLNd÷±úΩ¸*iPageV: Integer;°dONLNdÎøúÀ¸*iPageH: Integer;°dONLNdÕúŸ*bPort: SignedByte;°dONLNd€úÁ‰* feed: TFeed;°dONLNd(Èúı¥*END;
  989. H4H    .°dONLNdˇˇ( äField descriptions
  990. ˇ·ˇ‚7^
  991. .°dONLNd-ä¢*wDev.°dONLNd2Ê)\ The high-ord`°dONLNd=Î)4/der byte contains the device number of the curr†¿°dONLNdlÎ˚)—ent °dONLNdpÊ)(&Êprintero¿°dONLNdw)9) . The low-orÓ¿°dONLNdÉ9)m)5der byte is rS‡°dONLNdên)í)5eserved..°dONLNdô,ä8Æ(5äiPageV.°dONLNd†,Ê8)\ Reserved by 4‡°dONLNd¨,8<)9Apple..°dONLNd≥;äGÆ(DäiPageH.°dONLNd∫;ÊG)\ Reserved by 4‡°dONLNdΔ;G<)9Apple..°dONLNdÕJäV®(SäbPort.°dONLNd”JÊV)\ Reserved by 4‡°dONLNdflJV<)9Apple..°dONLNdÊYäe¢(bäfeed.°dONLNdÎYÊe7)\The feed type curr䇰dONLNd˝Y7e‹)Q'ently selected.  The possible values ar· °dONLNd$Y‹e„)•e:.°dONLNd.q“}
  992. (z“4TFeed = (feedCut,feedFanfold,feedMechCut,feedOther);
  993. §H¨4§H´ §H§
  994. ˇ·ˇ‚7^ .°dONLNdcñH§~(†H
  995. TPrStatus F¿°dONLNdmñ§Ö)7  ˇˇˇˇˇˇ(†1
  996. .°dONLNdp´ä∑û(¥äThe °dONLNdt´û∑‘)    TPrStatus°dONLNd}´‘∑⁄)6 rR`°dONLNd´⁄∑Ï)ecor$¿°dONLNdÉ´Ï∑3)d is used by the $¿°dONLNdî´3∑i)G    PrPicFile$¿°dONLNdù´i∑u)6 pr˜ °dONLNd†´t∑ë) ocedur…İdONLNd¶´ë∑ú)e (…İdONLNd©´ú∑Ω) page 1-…İdONLNd∞´Ω∑«)!50…İdONLNd≤´«∑)
  997. ), which you use .°dONLNd√∑ä√    (¿äto print spooled documents. .°dONLNd‡œä€ˆ*TPrStatus = RECORD°dONLNd˜›úÈ+iTotPages: Integer;°dONLNd›È)r °dONLNd›È¬) {Total pages in Print File.}°dONLNd3Îú˜(ÙúiCurPage: Integer;°dONLNdIΘ)l °dONLNdMΘò){Current page number}°dONLNdg˘ú(úiTotCopies: Integer;°dONLNdǢ™)~{Total copies requested}°dONLNdüú(úiCurCopy: Integer;°dONLNdµ)l °dONLNdπò){Current copy number}°dONLNd”ú!(úiTotBands: Integer;°dONLNdÍ!)r °dONLNdÓ!V)
  998. {Reserved}°dONLNd˝#ú/(,úiCurBand: Integer;°dONLNd#/)l °dONLNd#/V)
  999. {Reserved}°dONLNd&1ú=(:úfPgDirty: Boolean;°dONLNd=?úK¢* °dONLNdA?“K‘)6+{True if current page has been written to.}°dONLNdqMúY(VúfImaging: Boolean;°dONLNdáMY)l °dONLNdãMYV)
  1000. {Reserved}°dONLNdö[úg¸(dúhPrint: THPrint;°dONLNd±[gÏ)~#{Handle to the active print record}°dONLNdŸiúu(rúpPrPort: TPPrPort;°dONLNdÔiu)l °dONLNdÛiu∂){Ptr to the active PrPort}°dONLNdwúɸ(ÄúhPic: PicHandle;°dONLNd)wÉŒ)~{Handle to the active Picture}°dONLNdLÖúë¥(éúEND;ˇ˙@ˇ ˇˇˇˇ@
  1001. ˇ·ˇ‚7^
  1002. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1003. (‡*1 )-c)34    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  1004. ^*m¯4^*m¯    °dONLNdˇˇ(elField descriptions
  1005. ˇ·ˇ‚7^,
  1006. Courier
  1007. .°dONLNdjlv¢*    iTotPages.°dONLNd
  1008. j»vÓ)\CThe total number of pages being printed. This is the same value as .°dONLNdMv»Ç* the value of °dONLNdZvÇ7)9    iLastPage°dONLNdcv7Çé)6 minus the value of °dONLNdwvéÇ )W
  1009. iFirstPage°dONLNdÅv ÇÔ)<, which °dONLNdâÇ»é“(ã»arR`°dONLNdãÇ“é¯)
  1010.     e both fr$¿°dONLNdîǯé)&om the $¿°dONLNdõÇé=)!TPrJob$¿°dONLNd°Ç=éC)$ r˜ °dONLNd£ÇBéT)ecor…İdONLNdßÇTé_)d. °dONLNd´ëlùú(öliCurPage.°dONLNd¥ë»ùq)\$The sequence number of the page currÿİdONLNdÿëqù‹)©ently being printed. For °dONLNdÒù»©s(¶»(example, if the user prints pages 10 thr≤‡°dONLNdùs©–)´ough 15 of a 20-page .°dONLNd.©»µB(≤»document, the value of the °dONLNdI©Bµr)ziCurPage°dONLNdQ©rµ{)0 fi°dONLNdT©{µ’)    eld for page 10 is 1.  °dONLNdl∏lƒ®(¡l
  1011. iTotCopies.°dONLNdw∏»ƒD)\The total number of copies rÙ°dONLNdì∏Dƒ–)|equested. This value may be dif·‡°dONLNd≤∏–ƒ‹)åferƒ`°dONLNdµ∏‹ƒÏ) ent .°dONLNdπƒ»––(Õ»frR`°dONLNdªƒ––1)om the value of the fiR`°dONLNd—ƒ1–B)aeld R`°dONLNd’ƒB–l)iCopiesR`°dONLNd‹ƒl–v)* fr$¿°dONLNdflƒv–Ö)
  1012. om $¿°dONLNd‚ƒÖ–©)TPrJob$¿°dONLNd˃©–∞)$.  °dONLNdÏ”lflú(‹liCurCopy.°dONLNdı”»fl.)\The number of the curr‡°dONLNd ”/flò)gent copy being printed. .°dONLNd$‚lÓ¢(Îl    iTotBands.°dONLNd.‚»Ó)\ Reserved by 4‡°dONLNd:‚Ó!)9Apple. .°dONLNdBÒl˝ú(˙liCurBand.°dONLNdKÒ»˝)\ Reserved by 4‡°dONLNdWÒ˝!)9Apple. .°dONLNd_l ú(    lfPgDirty.°dONLNdh» œ)\A∫†°dONLNdiœ ◊) flG`°dONLNdlÿ Ê)    =ag indicating whether the printer has begun printing the curri¿°dONLNd©Ê ˆ(    Êent °dONLNd≠ »5(»page. Set to TRUE if thern‡°dONLNdΔ 5œ)m"e has been any imaging on the curr˚@°dONLNdË œ˜)ö    ent page..°dONLNdÚl'ú($lfImaging.°dONLNd˚»'œ)\A∫†°dONLNd¸œ'◊) flG`°dONLNdˇÿ'Â)    ?ag indicating whether the printer driver is in the middle of a .°dONLNd>'»3
  1013. (0» DrawPicture°dONLNdI'
  1014. 3#)B call. °dONLNdQ6lBê(?lhPrint.°dONLNdX6»B*)\The handle to the currpİdONLNdn6*BV)b ent print r¿°dONLNdy6WBi)-ecorx °dONLNd}6iBq)d..°dONLNdÄElQñ(NlpPrPort°dONLNdàE»Qb)\#The pointer to the active printing °dONLNd´EbQí)ögrafPort°dONLNd≥EíQƒ)0  data type.°dONLNdøTl`Ñ(]lhPic.°dONLNdƒT»`N)\The handle to the active pictur5†°dONLNd„TO`Ô)á'e. This is used by the printer driver; °dONLNd
  1015. `»lg(i»&your application should not alter it. 
  1016. ë*ô¯4ë*ò¯ ë*ë˛
  1017. ˇ·ˇ‚7^ °dONLNd1É*ëS(ç*TPrPortˇˇˇˇˇˇ(çÚ1
  1018. ˇˇòÃ.°dONLNd9òl§(°lThe ˇ˛ dðdONLNd=òħ™)TPrPortˇˇòÃðdONLNdDò™§Ø)* rɯ°dONLNdFòا¡)ecorVX°dONLNdJò¡§
  1019. )d is the printing ˇ˛ dπà°dONLNd\ò
  1020. §:)IgrafPortˇˇòÃπà°dONLNddò:§˜)0), which contains a handle to a QuickDraw °dONLNdç§l∞ú(≠lgrafPort°dONLNdï§ú∞fl)0, among other fPİdONLNd§§fl∞˚)Cields. °dONLNd¨ºl»Ã(≈lTPrPort = RECORD°dONLNd¡ ~÷fi+gPort: GrafPort;°dONLNd‘ fi÷t)`{The Printer's grafPort.}°dONLNdÚÿ~‰fi(·~gProcs: QDProcs;°dONLNdÿfi‰Ï)`-{The procedures for printing in the grafPort}°dONLNd7Ê~Ú‰(Ô~lGParam1:LongInt;°dONLNdNÊÍÚ&)l
  1021. {Reserved}°dONLNd]Ù~‰(˝~lGParam2:LongInt;°dONLNdtÙÍ&)l
  1022. {Reserved}°dONLNdÉ~‰( ~lGParam3:LongInt;°dONLNdöÍ&)l
  1023. {Reserved}°dONLNd©~‰(~lGParam4:LongInt;°dONLNd¿Í&)l
  1024. {Reserved}°dONLNdœ~*fi('~fOurPtr:Boolean;°dONLNdÂÍ*&)l
  1025. {Reserved}°dONLNdÙ,~8‰(5~fOurBits:Boolean;°dONLNd ,Í8&)l
  1026. {Reserved}°dONLNd:lFÑ(ClEND;
  1027. V*e¯4V*e¯    .°dONLNdˇˇ*Field descriptions
  1028. ˇ·ˇ‚7^
  1029. .°dONLNdcloä*gPort°dONLNd!c»o¸)\ The Printer=`°dONLNd,c˝o)5’s =`°dONLNd/co6)    grafPort=`°dONLNd7c6o9)0.°dONLNd9rl~ê({lgProcs.°dONLNd@r»~˛)\Pointers to rq`°dONLNdMr˛~)67outines that the printer driver may have designated to °dONLNdÑ~»äL(á»take the place of QuickDraw r¸‡°dONLNd°~Lä˜)Ñ%outines. See the chapter “QuickDraw” °dONLNdΔä»ñÈ(ì»for mor Ä°dONLNdÕäÈñ*)!e information. °‡°dONLNd‹ä*ñ0)AYb`°dONLNd›ä0ñ¨)ou can include a pointer to rÃ`°dONLNd˙ä¨ñˆ)|outines that you ˇˇïT.°dONLNd ñ»¢C(ü»would like to include in the ˇ˛ø¸ˇ¯°dONLNd(ñC¢y){    grafProcsˇˇïTˇ¯°dONLNd1ñy¢Å)6 fiïL°dONLNd4ñÇ¢Æ)     eld of the ˇ˛ø¸UH°dONLNd?ñØ¢fl)-grafPortˇˇïTUH°dONLNdGñfl¢¯)0 data .°dONLNdM¢»Æ„(´»type.  °dONLNdU±lΩò(∫llGParam1°dONLNd^±»Ω)\ Reserved by 4‡°dONLNdj±Ω!)9Apple. ˇ˛@ˇ ˇˇˇˇ@
  1030. ˇ·ˇ‚7^
  1031. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1032. ~¿(‡1‡)-a¿)35(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  1033. °dONLNd\äh∂(eälGParam1°dONLNd    \Êh)\ Reserved by 4‡°dONLNd\h?)9Apple. °dONLNdkäw∂(tälGParam1°dONLNd&kÊw)\ Reserved by 4‡°dONLNd2kw?)9Apple. °dONLNd:zäÜ∂(ÉälGParam1°dONLNdCzÊÜ)\ Reserved by 4‡°dONLNdOzÜ?)9Apple. °dONLNdWâäï¨(íäfOurPtr°dONLNd_âÊï)\ Reserved by 4‡°dONLNdkâï?)9Apple. °dONLNdsòä§Ø(°äfOurBits°dONLNd|òʧ)\ Reserved by 4‡°dONLNdàò§?)9Apple. 
  1034. »H–4…H– …H…
  1035. ˇ·ˇ‚7^ °dONLNdêªH…(≈H    TGnlData ≠İdONLNdôª…Ö)7  ˇˇˇˇˇˇ(≈1
  1036. .°dONLNdú–ä‹û(ŸäThe ,
  1037. Courier°dONLNd†–û‹Œ)TGnlData°dONLNd®–Œ‹‘)0 rR`°dONLNd™–‘‹Ê)ecor$¿°dONLNdÆ–Ê‹')d is the basic r˜ °dONLNdæ–&‹8)@ecor…İdONLNd¬–8‹u)d used by the …İdONLNd––u‹´)=    PrGeneral…İdONLNdŸ–´‹∑)6 prõ‡°dONLNd‹–∑‹‘) ocedurn@°dONLNd‚–‘‹fi)e. ‡°dONLNd–fi‹)
  1038.     Although °dONLNdÓ‹äˬ(Âäno opcode of °dONLNd˚‹¬Ë¯)8    PrGeneral°dONLNd‹¯Ë)6 uses °dONLNd
  1039. ‹Ë>)TGnlData°dONLNd‹>Ër)0, all other rR`°dONLNd‹rËÑ)4ecor$¿°dONLNd#‹Ñ˱)
  1040. ds that ar˜ °dONLNd-‹∞Ë◊),    e used ar…İdONLNd6‹◊Ë)' e based on .°dONLNdAËäÙ†(Òäthis r˛ °dONLNdGˆÙ≤)ecorrİdONLNdKË≥Ù¿)d.  .°dONLNdPä (    äTGnlData = RECORD°dONLNdfú+iOpCode: Integer;°dONLNd|ú(¸*iError: Integer;°dONLNdë*ú6*lReserved: LongInt;°dONLNd®*6Ï)r% {more fields here depending on call}°dONLNd“8úD¥(AúEND;
  1041. SHc4THb    .°dONLNdˇˇ([äField descriptions
  1042. ˇ·ˇ‚7^
  1043. .°dONLNd◊`äl¥*iOpCode°dONLNdfl`Êlh)\The opcode that is passed to °dONLNd¸`hlû)Ç    PrGeneral°dONLNd`ûl‡)6 to obtain the rR`°dONLNd`‡l    )B    equested °dONLNdlÊx(uÊfeaturR`°dONLNd$lx")e. Ther$¿°dONLNd+l"x3) e ar˜ °dONLNd/l2x@)e fi˜ °dONLNd3l@xú)ve possible opcodes: ˜ °dONLNdHlúx‰)\ GetRslDataOp˜ °dONLNdTl‰xÈ)H, °dONLNdVxÊÑ(ÅÊSetRslOp°dONLNd^xÑ)0, °dONLNd`xÑQ)    GetRotnOp°dONLNdixQÑV)6, °dONLNdkxVÑò) DraftBitsOp°dONLNdvxòÑ∞)B, and °dONLNd|x∞Ñ˛)NoDraftBitsOp°dONLNdâx˛Ñ)N. °dONLNdåáäìÆ(êäiError°dONLNdìáÊì˛)\The rR`°dONLNdòá˛ì0) esult code r$¿°dONLNd§á0ìa)2 eturned by $¿°dONLNdØáaìó)1    PrGeneral$¿°dONLNd∏áóìö)6.°dONLNd∫ñ䢿(üä    lReserved.°dONLNdƒñÊ¢)\ Reserved by 4‡°dONLNd–ñ¢?)9Apple. T°dONLNd◊ñ?¢w)  Additional fi!‡°dONLNd‰ñx¢⁄)9elds may follow this fi<@°dONLNd˚ñ⁄¢Ï)beld, °dONLNd¢ÊÆÈ(´Ê:depending on the opcode used. See the descriptions of the .°dONLNd:ÆÊ∫"*
  1044. TGetRslBlk°dONLNdDÆ"∫()< (°dONLNdFÆ(∫I)page 1-°dONLNdMÆI∫S)!35°dONLNdOÆS∫\)
  1045. ), °dONLNdRÆ\∫ò)    
  1046. TSetRslBlk°dONLNd\Æò∫û)< (°dONLNd^Æû∫ø)page 1-°dONLNdeÆø∫…)!37°dONLNdgÆ…∫“)
  1047. ), °dONLNdjÆ“∫)     TDftBitsBlk°dONLNduÆ∫)B °dONLNdv∫ÊΔÍ(√Ê(°dONLNdw∫ÍΔ )page 1-°dONLNd~∫ Δ)!38°dONLNdÄ∫Δ1)
  1048. ), and °dONLNdá∫1Δs) TGetRotnBlk°dONLNdí∫sΔy)B (°dONLNdî∫yΔö)page 1-°dONLNdõ∫öΔ§)!38°dONLNdù∫§ΔÆ)
  1049. ) rR`°dONLNd†∫ÆΔ¿)
  1050. ecor$¿°dONLNd§∫¿Δœ)ds. 
  1051. ÎHÛ4ÎHÚ ÎHÎ
  1052. ˇ·ˇ‚7^ .°dONLNd©›HÎá(ÁH TGetRslBlk ø°dONLNd¥›áÎç)?  ˇˇˇˇˇˇ(Á1
  1053. ˇˇ⁄‹.°dONLNd∑Úä˛ù(˚äThe ˇˇêîZ‹°dONLNdªÚû˛⁄)
  1054. TGetRslBlkˇˇ⁄‹Z‹°dONLNd≈Ú⁄˛ˇ)<     data str¸î°dONLNdŒÚˇ˛)%ucturŒÙ°dONLNd”Ú˛;)
  1055. e is the r1˰dONLNd›Ú<˛N)'ecorH°dONLNd·ÚN˛±)d that you pass to the ˇˇêî%p°dONLNd¯Ú±˛Á)c    PrGeneralˇˇ⁄‹%p°dONLNdÚÁ˛Ú)6 pr“¨°dONLNdÚÚ˛) ocedur• °dONLNd
  1056. Ú˛)e °dONLNd ˛ä
  1057. Ÿ(äwhen you use the °dONLNd˛Ÿ
  1058. !)O GetRslDataOp°dONLNd)˛!
  1059. [)H opcode. The °dONLNd6˛[
  1060. ë):    PrGeneral°dONLNd?˛ë
  1061. ù)6 prR`°dONLNdB˛ù
  1062. ∫) ocedur$¿°dONLNdH˛∫
  1063. ≈)e r˜ °dONLNdK˛ƒ
  1064. Û)
  1065. eturns the .°dONLNdV
  1066. äç(ärE°dONLNdW
  1067. é†)ecorπ`°dONLNd[
  1068. †”) d with the rJ†°dONLNdg
  1069. ‘^)4 esolutions available on the currh¿°dONLNdá
  1070. ^)ä(ent printing device. For information on .°dONLNdØä"Õ(ähow to use the °dONLNdæÕ")C GetRslDataOp°dONLNd "c)H opcode with the °dONLNd€c"ô)N    PrGeneral°dONLNd‰ô"•)6 prR`°dONLNdÁ•"¬) ocedur$¿°dONLNd̬"‹)e, see .°dONLNdÙ"ä.<(+ä'“Determining the Resolution of the CurrA@°dONLNd"=.°)≥ent Printer” on page 1-»‡°dONLNd2"°.´)d17»‡°dONLNd4"´.∞)
  1071. . °dONLNd74ä@(=äIf the printer uses discr~°dONLNdP4@m)fete printing, the number of rÈİdONLNdm4m@ˇ)}"esolution values available on the .°dONLNdè@äL(Iäprinter is listed in the °dONLNd®@L,)f
  1072. iRslRecCnt°dONLNd≤@,L5)< fi°dONLNdµ@5Lo)    eld and the rR`°dONLNd¬@oLÅ):ecor$¿°dONLNdΔ@ÅL)ds containing those values ar˜ °dONLNd„@L)Åe in °dONLNdËLäXú(Uäthe °dONLNdÏLúXÃ)rgRslRec°dONLNdÙLÃXË)0 arrayd@°dONLNd˙LÁXº). If the printer supports variable printing, the r6†°dONLNd,LºX)’esolution ranges in °dONLNd@Xäd∏(aä
  1073. the X and R`°dONLNdJX∏dø).Y$¿°dONLNdKXødœ) dir˜ °dONLNdOXŒd˘)
  1074. ections ar…İdONLNdYX˘d)+    e in the …İdONLNdbXdA)$xRslRg…İdONLNdhXAdV)$ and …İdONLNdmXVdz)yRslRg…İdONLNdsXzdÉ)$ fi…İdONLNdvXÉdõ)    elds. ˇ˙@ˇ ˇˇˇˇ@
  1075. ˇ·ˇ‚7^
  1076. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1077. (‡*1 )-c)36    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  1078. Courier
  1079. .°dONLNd\lhfi(elTGetRslBlk = RECORD°dONLNdj~v‰+iOpCode: Integer;°dONLNd0j¸vº)~ {The opcode passed to PrGeneral}°dONLNdUx~Ñfi(Å~iError: Integer;°dONLNdlx¸ÑÊ)~'{The result code returned by PrGeneral}°dONLNdòÜ~í(è~lReserved: LongInt;°dONLNd≤ܸín)~{Reserved by Apple}°dONLNd î~†‰(ù~iRgType: Integer;°dONLNd‚Œ)~#{The printer driver version number}°dONLNd
  1080. ¢~Æÿ(´~xRslRg: TRslRg;°dONLNd ¢¸Æ»)~"{The X-direction resolution range}°dONLNdG∞~ºÿ(π~yRslRg: TRslRg;°dONLNd]∞¸º»)~"{The Y-direction resolution range}°dONLNdÑæ~ ˆ(«~iRslRecCnt: Integer;°dONLNdü渠»)~"{The number of resolution records}°dONLNdΔÃ~ÿV(’~$rgRslRec: ARRAY [1..27] OF TRslRec; °dONLNdˆ⁄¸Ê¬+~!{The array of resolution records}°dONLNdË~Ùñ(Ò~END;
  1081. *¯4*¯    .°dONLNdˇˇ( lField descriptions
  1082. ˇ·ˇ‚7^
  1083. .°dONLNd!lñ*iOpCode°dONLNd)»;)\The opcode passed to the °dONLNdB;q)s    PrGeneral°dONLNdKq})6 prR`°dONLNdN}ö) ocedur$¿°dONLNdTö›)e to obtain the °dONLNdd»(Ã(%»rR`°dONLNdeÃ()equested featur$¿°dONLNdt(j)Ee. In the case of the $¿°dONLNdäj(¶)Y
  1084. TGetRslBlk$¿°dONLNdî¶(¨)< r˜ °dONLNdñ´(Ω)ecor…İdONLNdöΩ(⁄)d, the °dONLNd°(»4Û(1»
  1085. opcode is °dONLNd´(Û4;)+ GetRslDataOp°dONLNd∑(;4@)H. °dONLNd∫7lCê(@liError°dONLNd¡7»C‡)\The rR`°dONLNdΔ7‡C) esult code r$¿°dONLNd“7CC)2 eturned by $¿°dONLNd›7CCy)1    PrGeneral$¿°dONLNdÊ7yC|)6.°dONLNdËFlR¢(Ol    lReserved.°dONLNdÚF»R)\ Reserved by 4‡°dONLNd˛FR!)9Apple. .°dONLNdUlañ(^liRgType.°dONLNdU»a')\The version number r?‡°dONLNd"U(aß)`eturned by the printer driver9İdONLNd?Ußa·) . The LaserWǰdONLNdKU‡aı)9riter °dONLNdQa»m(j»
  1086. and ImageWª°dONLNd[am`)8riter printers always rœ@°dONLNdra`m¶)`eturn 1. If this fi†°dONLNdÖaßmı)Geld is not 1, don’t °dONLNdôm»y!(v»use the data in this r °dONLNdØm"y4)ZecoruİdONLNd≥m4yA)d.  .°dONLNd∏|làê(ÖlxRslRg.°dONLNdø|»àfl)\The rÄ¿°dONLNdƒ|flàå)'esolution range supported for the X dira°dONLNdÎ|åà◊)≠ection. If the currÀ@°dONLNd˛|◊àÁ)Kent °dONLNdà»î`(ë»#printer does not support variable rA°dONLNd%àaî–)ôesolution, this value is 0. .°dONLNdBól£ê(†lyRslRg.°dONLNdIó»£fl)\The rÄ¿°dONLNdNófl£u)"esolution range supported for the >¿°dONLNdpóv£|)óYº†°dONLNdqó|£ã) dir¿°dONLNduóå£◊)ection. If the currp°dONLNdàó◊£Á)Kent °dONLNd壻Ø`(¨»#printer does not support variable rA°dONLNdØ£aØ–)ôesolution, this value is 0. .°dONLNdÃ≤læ®(ªl
  1087. iRslRecCnt.°dONLNd◊≤»æ)\The number of r:İdONLNdÊ≤æ?)H esolution r\¿°dONLNdÒ≤?æQ)/ecor— °dONLNdı≤QæŸ) ds used by a particular printer °dONLNdæ» „(«»driver‡°dONLNdæ„ ) , up to 27..°dONLNd'ÕlŸú(÷lrgRslRec.°dONLNd0Õ»Ÿ)\An array of rõ`°dONLNd=ÕŸ0)9 esolution rΩ†°dONLNdHÕ0ŸB)/ecor2°dONLNdLÕCŸ∂)ds, each specifying a discr†°dONLNdgÕ∂Ÿ…)sete r4@°dONLNdlÕ…ŸÙ)
  1088. esolution °dONLNdvŸ»Â(‚»at which the curr° °dONLNdáŸÂú)K ent printer can print an image. .°dONLNd®Îl˜Ä(ÙlThe °dONLNd¨Îʧ)xRslRg°dONLNd≤Χ˜π)$ and °dONLNd∑Îπ˜›)yRslRg°dONLNdΩΛ˜Ê)$ fi°dONLNd¿Îʘ)     elds of the °dONLNdÃΘT)2
  1089. TGetRslBlk°dONLNd÷ÎT˜Z)< rR`°dONLNdÿÎZ˜l)ecor$¿°dONLNd‹Îl˜~)d ar˜ °dONLNd‡Î}˜¶)
  1090. e of type ˜ °dONLNdÍζ˜ ))TRslRg˜ °dONLNdΠ˜Ê)$. This .°dONLNd˜˜lç(ldata strº °dONLNdˇ˜ç§)!ucturB°dONLNd˜•Z)$e contains the minimum and maximum rD¿°dONLNd(˜Z◊)µesolutions supported by the °dONLNdDl~( lcurrذdONLNdH~ )ent printer driver’`°dONLNdZ ˙)L. If the currî °dONLNdg˚§)1'ent printer does not support variable r≤İdONLNdé§Ë)©esolution, both °dONLNdûlr(lfiå¿°dONLNd†r∏)elds of this subr™¿°dONLNd±∏ )Fecor °dONLNdµÀ‹)d ar‡°dONLNdπ‹Í)e 0..°dONLNdæ'l3Δ(0lTRslRg = RECORD°dONLNd“5~A“+iMin: Integer;°dONLNdÊ5ÍA∂)l"{The minimum resolution supported}°dONLNdC~O“(L~iMax: Integer;°dONLNd!CÍO∂)l"{The maximum resolution supported}°dONLNdHQ~]ñ(Z~END;
  1091. m*|¯4m*|¯    .°dONLNdˇˇ(tlField descriptions
  1092. ˇ·ˇ‚7^
  1093. .°dONLNdMzlÜÑ*iMin.°dONLNdRz»Ü)\The minimum r&°dONLNd_zÜö)Fesolution supported by the curr˛†°dONLNd~zôÜ»)ã ent printerK¿°dONLNdâz»ÜÊ)/    . If the °dONLNdíÜ»í>(è»printer supports only discr¿°dONLNd≠Ü?íR)wete r,`°dONLNd≤ÜRí¬)esolutions, this value is 0..°dONLNdœïl°Ñ(ûliMax.°dONLNd‘ï»°)\The maximum rdONLNd·ï°õ)Gesolution supported by the currmİdONLNdïõ° )å ent printer∫†°dONLNd ï…°Á).    . If the °dONLNd°»≠>(™»printer supports only discr¿°dONLNd/°?≠R)wete r,`°dONLNd4°R≠¬)esolutions, this value is 0.ˇÆ@ˇ ˇˇˇˇ@
  1094. ˇ·ˇ‚7^
  1095. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1096. ~¿(‡1‡)-a¿)37(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  1097. .°dONLNd\ähû(eäThe ,
  1098. Courier°dONLNd\ûhŒ)rgRslRec°dONLNd \Œh◊)0 fi°dONLNd\◊h)     eld of the °dONLNd\hA).
  1099. TGetRslBlk°dONLNd$\AhG)< rR`°dONLNd&\GhY)ecor$¿°dONLNd*\Yhk)d ar˜ °dONLNd.\jhì)
  1100. e of type ˜ °dONLNd8\ìhΩ))TRslRec˜ °dONLNd?\Ωh÷)*. The ˜ °dONLNdE\÷h)TRslRec˜ °dONLNdL\h)* .°dONLNdMhätù(qäsubr¿°dONLNdQhût∞)ecorÖ °dONLNdUh∞t’)d specifiè°dONLNd^h’t˝)%
  1101. es a discr °dONLNdhh˛t))ete r&†°dONLNdmht©)"esolution supported by the printer¿°dONLNdèh®t≠)ó. a†°dONLNdëh≠t¥)Aú@°dONLNdíh¥t) printer driver can .°dONLNd¶täÄÚ(}ähave up to 27 separate °dONLNdΩtÚÄ)hTRslRec°dONLNdƒtÄ")* rR`°dONLNdΔt"Ä4)ecor$¿°dONLNd t4ÄÇ)ds. (The ImageWg`°dONLNdŸtÅÄ)M riter printer driver contains 4 .°dONLNd˘Ääå§(âäsuch rJ¿°dONLNdˇÄ•å∑)ecorø °dONLNdÄ∑å«)ds.).°dONLNdòä§Í(°äTRslRec = RECORD°dONLNd¶ú≤ˆ+iXRsl: Integer;°dONLNd2¶≤‘)l"{Discrete resolution, X-direction}°dONLNdY¥ú¿ˆ(ΩúiYRsl: Integer;°dONLNdn¥¿‘)l"{Discrete resolution, Y-direction}°dONLNdï¬úŒ¥(ÀúEND;
  1102. ›HÌ4fiHÏ    .°dONLNdˇˇ(ÂäField descriptions
  1103. ˇ·ˇ‚7^
  1104. .°dONLNdöÍ䈮*iXRsl.°dONLNd†Íʈ)\    The discr2 °dONLNd©Íˆ"))ete rL¿°dONLNdÆÍ"ˆØ) esolution supported in the X diré°dONLNdŒÍ؈Œ)çection. .°dONLNd◊˘ä®(äiYRsl.°dONLNd›˘Ê)\    The discr2 °dONLNdÊ˘"))ete rL¿°dONLNd΢"ô)esolution supported in the k¿°dONLNd˘ôü)wYȆ°dONLNd˘üÆ) dir2¿°dONLNd ˘ØŒ)ection. 
  1105. *H24*H1 *H*
  1106. ˇ·ˇ‚7^ °dONLNdH*Ñ(&H TSetRslBlk „¿°dONLNdÑ*á)< ˇˇˇˇˇˇ(&1
  1107. ˇˇ⁄‹.°dONLNd!1ä=ù(:äThe ˇˇêîZ‹°dONLNd%1û=⁄)
  1108. TSetRslBlkˇˇ⁄‹Z‹°dONLNd/1⁄=ˇ)<     data str¸î°dONLNd81ˇ=)%ucturŒÙ°dONLNd=1=;)
  1109. e is the r1˰dONLNdG1<=N)'ecorH°dONLNdK1N=±)d that you pass to the ˇˇêî%p°dONLNdb1±=Á)c    PrGeneralˇˇ⁄‹%p°dONLNdk1Á=Ú)6 pr“¨°dONLNdn1Ú=) ocedur• °dONLNdt1=)e °dONLNdv=äIŸ(Fäwhen you use the °dONLNdá=ŸI    )OSetRslOp°dONLNdè=    Iv)0 opcode. It contains the rR`°dONLNd©=vI)m#esolutions that you want to use on °dONLNdÃIäU≠(Räthe currR`°dONLNd‘I≠Uü)#7ent printing device. For information on how to use the R`°dONLNd IüUœ)ÚSetRslOpR`°dONLNdIœU )0 opcode with °dONLNd Uäaú(^äthe °dONLNd$Uúa“)    PrGeneral°dONLNd-U“afi)6 prR`°dONLNd0Ufia˚) ocedur$¿°dONLNd6U˚a)e, see $¿°dONLNd=Ua )'“Determining the Resolution of the Curr˜ °dONLNddU…a )¥ent Printer” on .°dONLNdtaäm™(jäpage 1-Æ¿°dONLNd{a™m¥) 17Æ¿°dONLNd}a¥mπ)
  1110. . .°dONLNdÄyäÖ¸(ÇäTSetRslBlk = RECORD°dONLNdòáúì+iOpCode: Integer;°dONLNd∞áì⁄)~ {The opcode passed to PrGeneral}°dONLNd’ïú°¸(ûúiError: Integer;°dONLNdÏï°)~'{The result code returned by PrGeneral}°dONLNd£úØ(¨úlReserved: LongInt;°dONLNd2£Øå)~{Reserved by Apple}°dONLNdJ±úΩ¸(∫úhPrint: THPrint;°dONLNda±ΩÊ)~"{A handle to current print record}°dONLNdàøúÀˆ(»úiXRsl: Integer;°dONLNdûøÀ¯)~%{The X-direction resolution you want}°dONLNd»ÕúŸˆ(÷úiYRsl: Integer;°dONLNdfiÕŸ¯)~%{The Y-direction resolution you want}°dONLNd€úÁ¥(‰úEND;
  1111. ˜H4˜H    .°dONLNdˇˇ(˛äField descriptions
  1112. ˇ·ˇ‚7^
  1113. .°dONLNdä¥*iOpCode°dONLNdÊG)\The opcode passed to °dONLNd*G})a    PrGeneral°dONLNd3}ø)6 to obtain the rR`°dONLNdCø)Bequested featur$¿°dONLNdR)Ee. °dONLNdUÊ5(ÊIn the case of the °dONLNdh5q)O
  1114. TSetRslBlk°dONLNdrqw)< rR`°dONLNdtwâ)ecor$¿°dONLNdxâ—)d, the opcode is $¿°dONLNdâ—)HSetRslOp$¿°dONLNdë)0. °dONLNdîä+Æ((äiError°dONLNdõÊ+˛)\The rR`°dONLNd†˛+0) esult code r$¿°dONLNd¨0+a)2 eturned by $¿°dONLNd∑a+ó)1    PrGeneral$¿°dONLNd¿ó+ö)6.°dONLNd¬.ä:¿(7ä    lReserved.°dONLNdÃ.Ê:)\ Reserved by 4‡°dONLNdÿ.:?)9Apple. °dONLNd‡=äI•(FähPrint°dONLNdÁ=ÊIÌ)\A∫†°dONLNdË=ÌIH) handle to the print rˆ@°dONLNd˛=HIZ)[ecorj†°dONLNd=[If)d. X¿°dONLNd=fIl) Y@°dONLNd=lIˆ)our application should have alrΩ °dONLNd%=ˆI)äeady °dONLNd*IÊUÓ(RÊcrµ@°dONLNd,IÓU7)eated this print r†°dONLNd>I8UJ)Jecorä°dONLNdBIJUú)d and passed it thr˜‡°dONLNdUIúUˇ)Rough the PrintDefault °dONLNdkUÊaÔ(^ÊprG °dONLNdmUa)
  1115. ocedurfi`°dONLNdsUaI)e to make sur¿°dONLNdÄUJa )</e that all of the information in the handle is °dONLNdØaÊm(jÊgood. °dONLNd∂pä|°(yäiXRsl°dONLNdºpÊ|˝)\The rÄ¿°dONLNd¡p˝|Z)esolution in the X diri¿°dONLNd◊pZ|)](ection that you want the printer to use °dONLNdˇ|Êà*(ÖÊwhen printing. °dONLNdãäó°(îäiYRsl°dONLNdãÊó˝)\The rÄ¿°dONLNdã˝óC)esolution in the GİdONLNd+ãDóJ)GY≈`°dONLNd,ãJóY) dirİdONLNd0ãZó)(ection that you want the printer to use °dONLNdXóÊ£*(†Êwhen printing. ˇí@ˇ ˇˇˇˇ@
  1116. ˇ·ˇ‚7^
  1117. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1118. (‡*1 )-c)38    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  1119. .°dONLNd\lhà(elIf the ,
  1120. Courier°dONLNd\àh¨)iError°dONLNd\¨hµ)$ fi°dONLNd\µh )    eld rR`°dONLNd\ hÁ)eturns R`°dONLNd\Áh)noErrï°dONLNd!\h¡)*, the Printing Manager updates the print rg`°dONLNdK\¡h”)Ωecor9¿°dONLNdO\”hÙ)d with °dONLNdVhltÖ(qlthis rR`°dONLNd\hÖtv)8esolution, which the printer uses at print time. If the R`°dONLNdîhvtö)ÒiErrorR`°dONLNdöhöt£)$ fiR`°dONLNdùh£t∏)    eld r$¿°dONLNd¢h∏t’)eturns °dONLNd©tlÄ¢(}l    noSuchRsl°dONLNd≤t¢Ä )6
  1121. , the currR`°dONLNdºt ÄX)(!ent printer doesn’t support the r$¿°dONLNd›tXÄÖ)é
  1122. equested r˜ °dONLNdÁtÑĈ),esolution and the printer .°dONLNdÄlå(âl$driver does not change the setting. 
  1123. ∞*∏¯4±*∏¯ ±*±˛
  1124. ˇ·ˇ‚7^ °dONLNd&£*±j(≠* TDftBitsBlk Z°dONLNd2£k±n)A ˇˇˇˇˇˇ(≠Ú1
  1125. .°dONLNd4∏lƒÄ(¡lThe °dONLNd8∏ă¬) TDftBitsBlk°dONLNdC∏¬ƒ»)B rR`°dONLNdE∏»ƒ⁄)ecor$¿°dONLNdI∏⁄ƒ")d is the data str¿°dONLNdZ∏"ƒ8)Huctur„ °dONLNd_∏7ƒ^)
  1126. e is the rµÄ°dONLNdi∏^ƒp)'ecorᇰdONLNdm∏pƒ‘)d that you pass to the °dONLNdуl–¢(Õl    PrGeneral°dONLNd烢–Æ)6 prR`°dONLNdêƒÆ–À) ocedur$¿°dONLNdñƒÀ–!)e when you use the $¿°dONLNd©ƒ!–c)V DraftBitsOp$¿°dONLNd¥ƒc–fi)B opcode. For information on °dONLNd––l‹Ø(Ÿlhow to use the °dONLNdfl–Ø‹Ò)C DraftBitsOp°dONLNdÍ–Ò‹?)B opcode with the °dONLNd˚–?‹u)N    PrGeneral°dONLNd–u‹Å)6 prR`°dONLNd–Å‹û) ocedur$¿°dONLNd–û‹∏)e, see $¿°dONLNd–∏‹È)
  1127. “Choosing .°dONLNd‹lË(Âl"Draft-Quality Printing” on page 1-÷ °dONLNd@‹Ë)ò21÷ °dONLNdB‹Ë)
  1128. . .°dONLNdEÙl‰(˝lTDftBitsBlk = RECORD°dONLNd^~‰+iOpCode: Integer;°dONLNdv¸º)~ {The opcode passed to PrGeneral}°dONLNdõ~fi(~iError: Integer;°dONLNd≤¸Ê)~'{The result code returned by PrGeneral}°dONLNdfi~*('~lReserved: LongInt;°dONLNd¯¸*n)~{Reserved by Apple}°dONLNd,~8fi(5~hPrint: THPrint;°dONLNd',¸8»)~"{A handle to current print record}°dONLNdN:~Fñ(C~END;
  1129. U*e¯4V*d¯    .°dONLNdˇˇ(]lField descriptions
  1130. ˇ·ˇ‚7^
  1131. .°dONLNdSblnñ*iOpCode°dONLNd[b»n;)\The opcode passed to the °dONLNdtb;nq)s    PrGeneral°dONLNd}bqn})6 prR`°dONLNdÄb}nö) ocedur$¿°dONLNdÜbön›)e to obtain the °dONLNdñn»zÃ(w»rR`°dONLNdónÃz)equested featur$¿°dONLNd¶nzj)Ee. In the case of the $¿°dONLNdºnjz¨)Y TDftBitsBlk$¿°dONLNd«n¨z≤)B r˜ °dONLNd…n±z√)ecor…İdONLNdÕn√z‡)d, the °dONLNd‘z»ÜÛ(É»
  1132. opcode is °dONLNdfizÛÜ5)+ DraftBitsOp°dONLNdÈz5Ü:)B. °dONLNdÏâlïê(íliError°dONLNdÛâ»ï‡)\The rR`°dONLNd¯â‡ï) esult code r$¿°dONLNdâïU)2eturned by the $¿°dONLNdâUïã)C    PrGeneral$¿°dONLNdâãïó)6 pr˜ °dONLNdâñï≥) ocedur…İdONLNd%â≥ïª)e.°dONLNd(òl§¢(°l    lReserved.°dONLNd2ò»§)\ Reserved by 4‡°dONLNd>ò§!)9Apple. °dONLNdFßl≥á(∞lhPrint°dONLNdMß»≥œ)\A∫†°dONLNdNßœ≥*) handle to the print rˆ@°dONLNddß*≥<)[ecorj†°dONLNdhß=≥H)d. X¿°dONLNdkßH≥N) Y@°dONLNdlßN≥ÿ)our application should have alrΩ °dONLNdãßÿ≥Ô)äeady °dONLNdê≥»ø–(º»crµ@°dONLNdí≥–ø)eated this print r†°dONLNd§≥ø,)Jecorä°dONLNd®≥,ø~)d and passed it thr˜‡°dONLNdª≥~ø·)Rough the PrintDefault °dONLNd—ø»À—(»»prG °dONLNd”ø“À)
  1133. ocedurfi`°dONLNdŸøÀ+)e to make sur¿°dONLNdÊø,ÀÌ)</e that all of the information in the handle is °dONLNdÀ»◊„(‘»good. 
  1134. ¸*¯4¸*¯ ¸*¸˛
  1135. ˇ·ˇ‚7^ °dONLNdÓ*¸r(¯* TGetRotnBlk ù@°dONLNd(Ór¸x)H  ˇˇˇˇˇˇ(¯Ú1
  1136. .°dONLNd+lÄ( lThe °dONLNd/Ĭ) TGetRotnBlk°dONLNd:¬»)B rR`°dONLNd<»⁄)ecor$¿°dONLNd@⁄")d is the data str¿°dONLNdQ"8)Huctur„ °dONLNdV7^)
  1137. e is the rµÄ°dONLNd`^p)'ecorᇰdONLNddp‘)d that you pass to the °dONLNd{l¢(l    PrGeneral°dONLNdÑ¢Æ)6 prR`°dONLNdáÆÀ) ocedur$¿°dONLNdçÀ!)e when you use the $¿°dONLNd†!W)V    GetRotnOp$¿°dONLNd©W})6     opcode. $¿°dONLNd≤}≥)&    PrGeneral$¿°dONLNdª≥π)6 r˜ °dONLNdΩ∏fl)
  1138. eturns it .°dONLNd«l'≈($lOwith a Boolean variable that tells you whether the user has selected landscape .°dONLNd'l3<* /orientation. For information on how to use the °dONLNdE'<3r)–    GetRotnOp°dONLNdN'r3¿)6 opcode with the °dONLNd_'¿3ˆ)N    PrGeneral°dONLNdh'ˆ3¯)6 .°dONLNdi3l?u(<lprG °dONLNdk3v?î)
  1139. ocedurfi`°dONLNdq3î?Æ)e, see ¯@°dONLNdx3Æ?n))“Determining Page Orientation” on page 1-2@°dONLNd°3o?y)¡202@°dONLNd£3y?~)
  1140. . .°dONLNd¶KlW‰(TlTGetRotnBlk = RECORD°dONLNdøY~e‰+iOpCode: Integer;°dONLNd◊Y¸eº)~ {The opcode passed to PrGeneral}°dONLNd¸g~sfi(p~iError: Integer;°dONLNdg¸sÊ)~'{The result code returned by PrGeneral}°dONLNd?u~Å(~~lReserved: LongInt;°dONLNdYu¸Ån)~{Reserved by Apple}°dONLNdqÉ~èfi(å~hPrint: THPrint;°dONLNdàɸè»)~"{A handle to current print record}°dONLNdØë~ùˆ(ö~fLandscape: Boolean;°dONLNd ë¸ù‡)~&{If the user wants landscape printing}°dONLNdıü~´Í(®~bXtra: SignedByte;°dONLNdü¸´n)~{Reserved by Apple}°dONLNd&≠~πñ(∂~END;ˇn@ˇ ˇˇˇˇ@
  1141. ˇ·ˇ‚7^
  1142. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1143. ~¿(‡1‡)-a¿)39(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  1144. ^Hm4^Hm    °dONLNdˇˇ(eäField descriptions
  1145. ˇ·ˇ‚7^,
  1146. Courier
  1147. .°dONLNdjäv¥*iOpCode°dONLNdjÊvY)\The opcode passed to the °dONLNd!jYvè)s    PrGeneral°dONLNd*jèvõ)6 prR`°dONLNd-jõv∏) ocedur$¿°dONLNd3j∏v˚)e to obtain the °dONLNdCvÊÇÍ(ÊrR`°dONLNdDvÍÇ/)equested featur$¿°dONLNdSv/Çà)Ee. In the case of the $¿°dONLNdivàÇ )Y TGetRotnBlk$¿°dONLNdtv Ç–)B r˜ °dONLNdvvœÇ·)ecor…İdONLNdzv·Ç˛)d, the °dONLNdÅÇÊé(ãÊ
  1148. opcode is °dONLNdãÇéG)+    GetRotnOp°dONLNdîÇGéL)6. °dONLNdóëäùÆ(öäiError°dONLNdûëÊù˛)\The rR`°dONLNd£ë˛ù0) esult code r$¿°dONLNdØë0ùs)2eturned by the $¿°dONLNdæësù©)C    PrGeneral$¿°dONLNd«ë©ùµ)6 pr˜ °dONLNd ë¥ù—) ocedur…İdONLNd–ë—ùŸ)e.°dONLNd”†ä¨¿(©ä    lReserved.°dONLNd›†Ê¨)\ Reserved by 4‡°dONLNdȆ¨?)9Apple. °dONLNdÒØäª•(∏ähPrint°dONLNd¯ØÊªÌ)\A∫†°dONLNd˘ØÌªH) handle to the print rˆ@°dONLNdØHªZ)[ecorj†°dONLNdØ[ªf)d. X¿°dONLNdØfªl) Y@°dONLNdØlªˆ)our application should have alrΩ °dONLNd6؈ª)äeady °dONLNd;ªÊ«Ó(ƒÊcrµ@°dONLNd=ªÓ«7)eated this print r†°dONLNdOª8«J)Jecorä°dONLNdSªJ«ú)d and passed it thr˜‡°dONLNdfªú«ˇ)Rough the PrintDefault °dONLNd|«Ê”Ô(–ÊprG °dONLNd~«”)
  1149. ocedurfi`°dONLNdÑ«”I)e to make sur¿°dONLNdë«J” )</e that all of the information in the handle is °dONLNd¿”Êfl(‹Êgood. .°dONLNd«‚äÓΔ(Îä
  1150. fLandscape.°dONLNd“‚ÊÓÌ)\A∫†°dONLNd”‚ÌÓ)@ Boolean variable that determines whether the user has selected °dONLNdÓÊ˙Æ(˜Ê/landscape orientation in the style dialog box. ~ °dONLNdBÓÆ˙µ)»A∏¿°dONLNdCÓµ˙˙) value of TRUE °dONLNdR˙Êœ(Ê6indicates the user has selected landscape orientation..°dONLNdâ    ä®(äbXtra.°dONLNdè    Ê)\ Reserved by 4‡°dONLNdõ    ?)9Apple. 
  1151. :HB4:HA :H:
  1152. ˇ·ˇ‚7^ °dONLNd£,H:q(6HTPrDlg HİdONLNd™,r:u)* ˇˇˇˇˇˇ(61
  1153. .°dONLNd¨AäMû(JäThe °dONLNd∞AûM¬)TPrDlg°dONLNd∂A¬M»)$ rR`°dONLNd∏A»M⁄)ecor$¿°dONLNdºA⁄Mˇ)Dd contains the information needed to set up either the style or job °dONLNdMäY“(Vädialog box. The °dONLNdM“Y)H    PrStlInit°dONLNdMY)6 and °dONLNdMYS)    PrJobInit°dONLNd'MSY)6  function rR`°dONLNd2MY±), eturn this r$¿°dONLNd>M±Y√)2ecor˜ °dONLNdBM¬Y
  1154. )d, set up for the .°dONLNdTYäe(bästyle and job dialog boxes r‰°dONLNdpYe3)x espectively°dONLNd{Y3e8)1. Ô`°dONLNd}Y7e=)Y؇°dONLNd~Y=eb)ou can fiz‡°dONLNdáYce)&%nd information on how to customize a °dONLNd¨eäqÌ(näprinting dialog box in ä`°dONLNd√eÌq≈)c1“Altering the Style or Job Dialog Box” on page 1-ù`°dONLNdÙe≈qœ)ÿ23ù`°dONLNdˆeœq÷)
  1155. .  .°dONLNd˙}äâ‰(ÜäTPrDlg = RECORD°dONLNdãúó¥+Dlg:°dONLNdã‰ó2)HDialogRecord;°dONLNd'ã2ó8)N °dONLNd+ãbóÏ)0{Ptr to the dialog box}°dONLNdGôú•ÿ(¢ú
  1156. pFltrProc:°dONLNdUô‰•V)HModalFilterProcPtr;°dONLNdoôb•¯)~{The dialog event filter}°dONLNdçßú≥ÿ(∞ú
  1157. pItemProc:°dONLNdõ߉≥2)HPItemProcPtr;°dONLNdØßb≥)~{The Item evaluating proc.}°dONLNdœµú¡ÿ(æú
  1158. hPrintUsr:°dONLNd›µ‰¡)HTHPrint;°dONLNdϵb¡Œ)~{The print record}°dONLNd√úœ¿(ÃúfDoIt:°dONLNd√‰œ)HBoolean;°dONLNd√bœÊ)~{Dialog box confirmed}°dONLNd7—ú›¿(⁄úfDone:°dONLNdA—‰›)HBoolean;°dONLNdP—b›)~{User’s interaction completed}°dONLNdsflúÎΔ(ËúlUser1:°dONLNd~fl‰Î)HLongInt;°dONLNdçflbÎ)~{Storage for your application}°dONLNd∞Ìú˘Δ(ˆúlUser2:°dONLNdª̉˘)HLongInt;°dONLNd Ìb˘)~{Storage for your application}°dONLNdÌ˚úΔ(úlUser3:°dONLNd¯˚‰)HLongInt;°dONLNd˚b)~{Storage for your application}°dONLNd*    úΔ(úlUser4:°dONLNd5    ‰)HLongInt;°dONLNdD    b)~{Storage for your application}°dONLNdgú#¥( úEND;
  1159. 3HB43HB    .°dONLNdˇˇ(:äField descriptions
  1160. ˇ·ˇ‚7^
  1161. .°dONLNdl@äLú*Dlg.°dONLNdp@ÊLÌ)\A∫†°dONLNdq@ÌL)A pointer to the dialog box, which may be either the style or job °dONLNd≤LÊX(UÊ dialog box. .°dONLNdø[äg¿(dä    pFltrProc.°dONLNd…[ÊgÌ)\A∫†°dONLNd [Ìgm) pointer to the dialog event fiÀ°dONLNdÈ[mg{)ÄlterÙ†°dONLNdÌ[{gÄ). .°dONLNdjäv¿(sä    pItemProc.°dONLNd˙jÊvÌ)\A∫†°dONLNd˚jÌv1) pointer to the rD‡°dONLNd j2v)E1outine that handles the items of the dialog box, °dONLNd=vÊÇq(Êalso known as the dialog hook. .°dONLNd]Öäë¿(éä    hPrintUsr.°dONLNdgÖÊëK)\The document’s print r/‡°dONLNd}ÖLë^)fecor§@°dONLNdÅÖ^ëf)d..°dONLNdÑî䆮(ùäfDoIt.°dONLNdäîʆ\)\Whether the user has confiõ°dONLNd§î\†)v$rmed the dialog box. TRUE means the °dONLNd»†Ê¨"(©Êuser has confiR†°dONLNd÷†#¨î)=rmed it by clicking “OK”.ˇV@ˇ ˇˇˇˇ@
  1162. ˇ·ˇ‚7^
  1163. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1164. (‡*1 )-c)40    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  1165. Courier
  1166. .°dONLNd\lhä(elfDone.°dONLNd\»h)\Whether the userÜ °dONLNd\h)M1’s interaction is completed. TRUE means the user °dONLNdGh»tk(q»%has clicked either “OK” or “Cancel”. .°dONLNdmwlÉê(ÄllUser1.°dONLNdtw»ÉÏ)\    In this fiı¿°dONLNd~wÏÉS)$eld and the following fiJ@°dONLNdñwTÉŸ)helds, your application can storÖ¿°dONLNdµwŸÉÛ)Öe any °dONLNdªÉ»è‰(å»Bkind of data you wish for the dialog box, such as global storage. .°dONLNd˛ílûê(õllUser2°dONLNdí»û⁄)\See °dONLNd    í⁄û˛)lUser1°dONLNdí˛û)$.°dONLNd°l≠ê(™llUser3°dONLNd°»≠⁄)\See °dONLNd°⁄≠˛)lUser1°dONLNd"°˛≠)$.°dONLNd$∞lºê(πllUser4°dONLNd+∞»º⁄)\See °dONLNd/∞⁄º˛)lUser1°dONLNd5∞˛º)$.
  1167. È*Ò¯4Í*Ò¯ Í*Ͳ
  1168. ˇ·ˇ‚7^ˇˇ◊.ˇ◊°dONLNd7ÿ*Èg(Â*Routinesˇˇˇˇˇˇ®(Â1
  1169. °dONLNd@ıl‚(˛lThis section describes the r@°dONLNd\ı„Ω)w2outines you use to initialize the Printing ManagerIİdONLNdéıΩ·)⁄
  1170. , print a °dONLNdòlß(
  1171. l document, pr °dONLNd§®Ω)<Aoduce or alter a style or job dialog box, and handle printing errNİdONLNdÂΩÕ(
  1172. Ωors.ˇˇˆÿ.°dONLNdÍl´(lThe trap macr@°dONLNd˜¨Ú)@o for all of the r‰®°dONLNd    Úç)F$outines in the Printing Manager is  ˇˇ‰à§ê°dONLNd-é∏)ú_PrGlueˇˇˆÿ§ê°dONLNd4∏˜)*, and the trap .°dONLNdCl+∞((lis $A8FD. The r9¿°dONLNdR±+N)E%outine selector for each individual r≥İdONLNdwN+Ä)ù outine is pr‚`°dONLNdÉÄ+Ã)2ovided with the r] °dONLNdîÕ+Ó)Moutine. 
  1173. O*W¯4P*W¯ P*P˛
  1174. ˇ·ˇ‚7^ °dONLNdùB*P(L*)Opening and Closing the Printing Manager ˇˇˇˇˇˇ(LÚ1
  1175. °dONLNd«Wlcr(`lY@İdONLNd»WrcK).ou must always open the Printing Manager beforF°dONLNdˆWKc›)Ÿ#e attempting to print and close it °dONLNdcloΩ(llwhen printing is fi/@°dONLNd,cæoå)R0nished. If you don’t, you risk crashing the user@°dONLNd\cçoº)œ ’s system.  
  1176. ü*߯4†*߯ †*†˛
  1177. ˇ·ˇ‚7^ °dONLNdjí*†W(ú*PrOpen &İdONLNdqíX†[). ˇˇˇˇˇˇ(úÚ1
  1178. .°dONLNds±lΩë(∫lUse the °dONLNd{±ëΩµ)%PrOpen°dONLNdűµΩ¡)$ prR`°dONLNdѱ¡Ωfi) ocedur$¿°dONLNdä±fiΩ˙)e to pr˜ °dONLNd뱢Ω)epar…İdONLNdï±Ωö) e the Printing Manager for use. °dONLNd∂…l’“(“lPROCEDURE PrOpen;.°dONLNd»Ò*˙c(¯* DESCRIPTION
  1179. .°dONLNd‘l s+BYï°dONLNd’r €)ou must always use the ï°dONLNdÏ€ ˇ)iPrOpenï°dONLNdÚˇ  )$ prg`°dONLNdı  () ocedur9¿°dONLNd˚( F)e befor  °dONLNdF ’) e attempting to print anything. .°dONLNd#&*/Q(-*ASSEMBLfl°dONLNd*&P/≤)&Y LANGUAGE INFORMAðdONLNd<&≤/«)bTION
  1180. .°dONLNdA5lAÑ(>lThe rR`°dONLNdF5ÑAË)outine selector for the R`°dONLNd^5ËA )dPrOpenR`°dONLNdd5 A)$ pr$¿°dONLNdg5A5) ocedur˜ °dONLNdm54Az)e is $C8000000.     .°dONLNd~ElPq(MlTÄ–°dONLNdEqPú)    rap macro°dONLNdäE¸P)ãTÄ–°dONLNdãEP)rap
  1181. .°dONLNdèSl_ñ(\l_PrGlue.°dONLNdòS¸_)ê$A8FD
  1182. è*ó¯4ê*ó¯ ê*ê˛
  1183. ˇ·ˇ‚7^ °dONLNdüÇ*êW(å*PrClose &İdONLNdßÇXê[). ˇˇˇˇˇˇ(åÚ1
  1184. .°dONLNd©°l≠ë(™lUse the °dONLNd±°ë≠ª)%PrClose°dONLNd∏°ª≠«)* prR`°dONLNdª°«≠‰) ocedur$¿°dONLNd¡°‰≠à)%e to close the Printing Manager and r˜ °dONLNdʰá≠Ë)£elease the memory it .°dONLNd˚≠lπÜ(∂lused. ˇ>@ˇ ˇˇˇˇ@
  1185. ˇ·ˇ‚7^
  1186. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1187. ~¿(‡1‡)-a¿)41(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿,
  1188. Courier
  1189. .°dONLNd\ähˆ(eäPROCEDURE PrClose;.°dONLNdÑHçÅ(ãH DESCRIPTION
  1190. .°dONLNdìäüû+BThe °dONLNd#ìûü»)PrClose°dONLNd*ì»ü‘)* prR`°dONLNd-ì‘üÒ) ocedur$¿°dONLNd3ìÒü°)*e is the call that balances a call to the $¿°dONLNd]ì°ü≈)∞PrOpen$¿°dONLNdcì≈ü—)$ pr˜ °dONLNdfì–üÌ) ocedur…İdONLNdlìÌüı)e.°dONLNdo•ä±p(Æä1If you have opened the Printing Manager with the °dONLNd†•p±î)ÊPrOpen°dONLNd¶•)$ prR`°dONLNd©•†±Ω) ocedur$¿°dONLNdØ•Ω±
  1191. )e, do not call the °dONLNd¬±äΩÃ(∫ä PrDrvrClose°dONLNdÕ±ÃΩÿ)B prR`°dONLNd–±ÿΩı) ocedur$¿°dONLNd÷±ıΩÄ)e to close the Printing Managerg`°dONLNdı±ΩÇ)ä..°dONLNd˜◊H‡o(fiHASSEMBLfl°dONLNd˛◊n‡–)&Y LANGUAGE INFORMAðdONLNd◊–‡Â)bTION
  1192. .°dONLNdÊäÚ¢(ÔäThe rR`°dONLNdÊ¢Ú)outine selector for the R`°dONLNd2ÊÚ0)dPrCloseR`°dONLNd9Ê0Ú<)* pr$¿°dONLNd<Ê<ÚY) ocedur˜ °dONLNdBÊXÚü)e is $D0000000.     .°dONLNdSˆäè(˛äTÄ–°dONLNdTˆè∫)    rap macro°dONLNd_ˆ)ãTÄ–°dONLNd`ˆ-)rap
  1193. .°dONLNddä¥(ä_PrGlue.°dONLNdm9)ê$A8FD
  1194. 4H<45H< 5H5
  1195. ˇ·ˇ‚7^ °dONLNds'H5ç(1HFilling and Vl¿°dONLNdÄ'å5Ù)Derifying Print Recor∫@°dONLNdî'Ù5)hdsˇˇˇˇˇˇ(11
  1196. °dONLNdó<äHê(EäY@İdONLNdò<êHº)    ou must fi$`°dONLNd¢<ΩHÚ)-ll the print r`°dONLNd∞<ÚH)5ecor|¿°dONLNd¥<HÑ)d with the values for the curr-¿°dONLNd“<ÖH›)Åent printer driver or<@°dONLNdÁ<›H
  1197. )X, if a print °dONLNdÙHäTç(QärE°dONLNdıHéT†)ecorπ`°dONLNd˘H†T¥)d alrİdONLNd˛HµTö)7eady exists, verify that the information in the print rw¿°dONLNd5HöT¨)ÂecorÏ °dONLNd9H¨T–)    d is corr †°dONLNdBH–T)$ect. If the print °dONLNdTTä`ç(]ärE°dONLNdUTé`†)ecorπ`°dONLNdYT†`)d is not valid for the currfi‡°dONLNdtT`Z)nent printer driver@°dONLNdÜT[`Ú)M#, the document will not print. The .°dONLNd©`älΔ(iä
  1198. PrValidate°dONLNd≥`Δl)< function ensurR`°dONLNd¬`lV)?es that the print r$¿°dONLNd’`Vlh)Qecor˜ °dONLNdŸ`glÍ)d is compatible with the curr…İdONLNdˆ`Íl˙)Éent °dONLNd˙läx(uäversions of the printer driver¬†°dONLNdl x%)Ç. The ¬†°dONLNdl%xm) PrintDefault¬†°dONLNd*lmxy)H prï°dONLNd-lyxñ) ocedurg`°dONLNd3lñx§)e fig`°dONLNd7l§x‚)lls in a print r9¿°dONLNdGl‚xÙ)>ecor  °dONLNdKlÙx)d with .°dONLNdRxäÑ(Åäthe default values for the curr≠@°dONLNdqxÑj)Éently selected printerBİdONLNdáxjÑˇ)]!. These functions may change the °dONLNd®Ñäêù(çäcoor†@°dONLNd¨Ñùê˜)dinates of the page rÖ`°dONLNd¡јê©)Z*ectangle or any other value in the print rŒ†°dONLNdÎÑ©êª)≤ecorC°dONLNdÔѺê )d; you should not °dONLNdêäú˜(ôäassume any values will rp¿°dONLNdê˜ú>)memain the same.
  1199. ÃH‘4ÕH‘ ÕHÕ
  1200. ˇ·ˇ‚7^ °dONLNd*øHÕ](…HPrVÄ@°dONLNd-ø\ÕÑ)alidate œÄ°dONLNd5øÑÕá)( ˇˇˇˇˇˇ(…1
  1201. °dONLNd7fiä͈(ÁäWhen you have a print ro@°dONLNdNfiˆÍ)lecor„†°dONLNdRfiÍÜ)d, whether an existing one fr_°dONLNdofiáÍ∫) om the curr¥‡°dONLNdzfi∫Í )3ent document or a .°dONLNdåÍäˆÙ(Ûänew one you have just crR`°dONLNd§ÍÙˆX)jeated, you can use the R`°dONLNdªÍXˆî)d
  1202. PrValidateR`°dONLNd≈Íîˆı)< function to check the .°dONLNd‹ˆäÈ(ˇäcontents of the specifi(¿°dONLNdÛˆÍ)`
  1203. ed print rƒ°dONLNd˝ˆ%))ecor8`°dONLNdˆ&¥)!d for compatibility with the currËİdONLNd"ˆ¥)éent version of the °dONLNd5ä˜( äprinter driver of the curr\ °dONLNdO˜&)m ent printer©@°dONLNdZ%*).. .°dONLNd]ä&§(#ä/FUNCTION PrValidate (hPrint: THPrint): Boolean;°dONLNdç2ä>Æ*hPrint.°dONLNdî2Ã>8)BThe handle to the specifi؆°dONLNd≠28>a)l
  1204. ed print rJ‡°dONLNd∑2b>t)*ecorø@°dONLNdª2t>‡)d, which may be a new r¿°dONLNd“2·>Û)mecorç °dONLNd÷2Û>)d or an °dONLNdfi>ÃJ
  1205. (GÃexisting one frL@°dONLNdÌ> JR)?om a document.°dONLNd¸dHmÅ(kH DESCRIPTION
  1206. .°dONLNdsä√+BIf the print rR`°dONLNds√’)9ecor$¿°dONLNds’) d is valid, $¿°dONLNd&sB)1
  1207. PrValidate$¿°dONLNd0sBH)< r˜ °dONLNd2sGd)eturns ˜ °dONLNd9sdÇ)FALSE˜ °dONLNd>sÇ√), meaning ther…İdONLNdLs√)Ae is no change. If °dONLNd_äã†(àäthe rR`°dONLNdd†ã≤)ecor$¿°dONLNdh≤ã()d is invalid, the function r˜ °dONLNdÑ'ãD)ueturns ˜ °dONLNdãDã\)TRUE˜ °dONLNdè\ã)& and the Printing Manager adjusts the .°dONLNdµãäóç(îärE°dONLNd∂ãéó†)ecorπ`°dONLNd∫ã†ó!)d with the default values storG°dONLNdÿã"óp)Çed in the printer r5†°dONLNdÎãpóà)Nesour}‡°dONLNdãàóô)ce fiDİdONLNdıãöó§)le.ˇ<@ˇ ˇˇˇˇ@
  1208. ˇ·ˇ‚7^
  1209. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1210. (‡*1 )-c)42    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  1211. Courier
  1212. .°dONLNd\lh®(el
  1213. PrValidate°dONLNd
  1214. \®hÎ)< also makes surR`°dONLNd\Îhù)C)e that all the information in the print r$¿°dONLNdB\ùhØ)≤ecor˜ °dONLNdF\ÆhÒ)d is internally .°dONLNdVhlt(ql'self-consistent and updates the print ræ`°dONLNd}ht%)ßecor2¿°dONLNdÅh&te)d as necessary@`°dONLNdèhdt“)>. These changes do not afÏ@°dONLNd®h“tÙ)n    fect the °dONLNd±tlă(}lfunction’s Boolean r·†°dONLNd≈tƒÄfi)Xesult. .°dONLNdÕÜlíª(èlIf you have just crR`°dONLNd‡Üªí¸)Oeated a print r$¿°dONLNdÔܸí)Aecor˜ °dONLNdÛÜíC)d, using the ˜ °dONLNdÜCíã)6 PrintDefault˜ °dONLNd Üãíó)H pr…İdONLNdÜóí¥) ocedurõ‡°dONLNdÜ¥íÌ)e, you do not °dONLNd#ílû¢(õlneed to call °dONLNd0í¢ûfi)6
  1215. PrValidate°dONLNd:ífiû˜)<. The °dONLNd@í˜û?) PrintDefault°dONLNdLí?ûK)H prR`°dONLNdOíKûh) ocedur$¿°dONLNdUíhû‹)e does this automatically    °dONLNdní€û‡)s. 
  1216. ´*∏¯4¨*∑¯,Zapf Dingbats.°dONLNdˇˇ(≤Xs°dONLNdˇˇ+WúİdONLNdˇˇ)ARNING
  1217. ˇ·ˇ‚7^
  1218. .°dONLNdqµl¡s(ælYï°dONLNdrµr¡Œ)ou should never call ï°dONLNdᵌ¡
  1219. )\
  1220. PrValidateï°dONLNdëµ
  1221. ¡t)< between the pages of a °dONLNd©¡lÕ∂( ldocument. This rR`°dONLNdπ¡∂ÕC)J!estriction holds as well for the R`°dONLNd⁄¡CÕÖ)ç PrStlDialogR`°dONLNd¡ÖÕö)B and °dONLNdÍÕlŸÆ(÷l PrJobDialog°dONLNdıÕÆŸˇ)B functions and the °dONLNdÕˇŸG)Q PrintDefault°dONLNdÕGŸS)H prR`°dONLNdÕSŸp) ocedur$¿°dONLNdÕpŸö)    e, which °dONLNd&ŸlÂÄ(‚lcall °dONLNd+ŸÄº)
  1222. PrValidate°dONLNd5ŸºÂø)<..°dONLNdˇˇ)s°dONLNdK*    Q(*ASSEMBLfl°dONLNdRP    ≤)&Y LANGUAGE INFORMAðdONLNdd≤    «)bTION
  1223. .°dONLNdilÑ(lThe rR`°dONLNdnÑË)outine selector for the R`°dONLNdÜË$)d
  1224. PrValidateR`°dONLNdê$â)< function is $52040498.     .°dONLNd©l)q(&lTÄ–°dONLNd™q)ú)    rap macro°dONLNdµ¸))ãTÄ–°dONLNd∂))rap
  1225. .°dONLNd∫,l8ñ(5l_PrGlue.°dONLNd√,¸8)ê$A8FD
  1226. i*q¯4i*p¯ i*i˛
  1227. ˇ·ˇ‚7^ °dONLNd [*ir(e*PrintDefault  @°dONLNd◊[riu)H ˇˇˇˇˇˇ(eÚ1
  1228. .°dONLNdŸzlܧ(Él When you crR`°dONLNd‰z§Üfl)8eate a print r$¿°dONLNdÚzflÜÒ);ecor˜ °dONLNdˆzÜ/)d, you use the ˜ °dONLNdz/Üw)? PrintDefault˜ °dONLNdzwÜÉ)H pr…İdONLNdzÉ܆) ocedurõ‡°dONLNdz†Üπ)e to fiõ‡°dONLNd!zπÜ‹)ll the fiõ‡°dONLNd*z‹ÜÒ)#elds .°dONLNd/Ülí§(èlof the specifidONLNd=ܧíÕ)8
  1229. ed print r0 °dONLNdGÜŒí‡)*ecor§Ä°dONLNdK܇íS)d with default values for r‡°dONLNdfÜTíÊ)t!esolution, number of copies, and °dONLNdáílûÙ(õl other information in the print rM‡°dONLNdßíıû)âecor¬@°dONLNd´íûC)d and its subrC†°dONLNdπíDûV)=ecor∏°dONLNdΩíVûe)ds. .°dONLNd¬™l∂b(≥l)PROCEDURE PrintDefault (hPrint: THPrint);°dONLNdϬlŒê*hPrint.°dONLNd۬ƌ)BThe handle to the specifi؆°dONLNd ¬ŒC)l
  1230. ed print rJ‡°dONLNd¬DŒV)*ecorø@°dONLNd¬VŒ¬)d, which may be a new r¿°dONLNd1¬√Œ’)mecorç °dONLNd5¬’Œˆ)d or an °dONLNd=ŒÆ⁄Ï(◊Æexisting one frL@°dONLNdLŒÌ⁄4)?om a document.°dONLNd[ı*˛c(¸* DESCRIPTION
  1231. °dONLNdglÚ+BThe default values for the currㆰdONLNdÜÚ,)Üent printer ar€ °dONLNdî,D):e storfi†°dONLNdöDí)ed in the printer rÕ@°dONLNd≠í™)NesourİdONLNd≤´º)ce fi‹ °dONLNd∑º»)le. ˇˇxæ.°dONLNdªl¥(l PrintDefaultˇˇ“ͰdONLNd«¥>)H! puts these values in the print rΔ°dONLNdË?Q)ãecorÈ&°dONLNdÏPfi) d, erasing the ones that may alr≠°dONLNd fl˜)èeady ˇˇI°dONLNdl'ã($lbe therõ|°dONLNdã'Ã)e (if the print ríL°dONLNd)Ã'fi)Aecord¨°dONLNd-fi'Û)d alrÄ(°dONLNd2Û'4)eady existed). ˇ˝€T`°dONLNdA5'})B PrintDefaultˇˇI`°dONLNdM}'ï)H calls ˇ˝€T§ò°dONLNdTï'—)
  1232. PrValidateˇˇI§ò°dONLNd^—'˜)<
  1233.  to check .°dONLNdh'l3ò(0l the print r@°dONLNds'ô3´)-ecorᆰdONLNdw'´39)!d for compatibility with the curr7¿°dONLNdò':3≈)è!ent version of the printer driverS†°dONLNdπ'≈3 )ã. °dONLNdºN*WQ(U*ASSEMBLfl°dONLNd√NPW≤)&Y LANGUAGE INFORMAðdONLNd’N≤W«)bTION
  1234. .°dONLNd⁄\lhÑ(elThe rR`°dONLNdfl\ÑhË)outine selector for the R`°dONLNd˜\Ëh0)d PrintDefaultR`°dONLNd\0h<)H pr$¿°dONLNd\<hY) ocedur˜ °dONLNd \Xhú)e is $20040480.     .°dONLNdllwq(tlTÄ–°dONLNdlqwú)    rap macro°dONLNd)l¸w)ãTÄ–°dONLNd*lw)rap
  1235. .°dONLNd.zlÜñ(Él_PrGlue.°dONLNd7z¸Ü)ê$A8FD°dONLNd=°*™Q(®*SEE ALSO
  1236. °dONLNdFØlªõ+B The print rÒ†°dONLNdQØõª≠)/ecorf°dONLNdUØÆª˘)d is discussed in x¿°dONLNdgØ˘ªC)K“The Print RecorO@°dONLNdwØCª‚)J#d and the Printing Loop” on page 1-ı@°dONLNdöØ‚ªÁ)ü7ı@°dONLNdõØÁªÏ). ˇÜ@ˇ ˇˇˇˇ@
  1237. ˇ·ˇ‚7^
  1238. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1239. ~¿(‡1‡)-a¿)43(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  1240. jHq4jHq jHj
  1241. ˇ·ˇ‚7^ °dONLNd\Hjk(fH4Displaying and Customizing the Printing Dialog Boxesˇˇˇˇˇˇ(f1
  1242. °dONLNd5qä}(zäXThe style and job dialog boxes allow the user to tell your application how to print the °dONLNdç}äâ‰* Ndocument: page orientation, number of copies, page range to print, and so on. û@°dONLNd€}‰âÍ(܉Y^¿°dONLNd‹}Íâ    )ou can °dONLNd„âäïÔ(íäuse the dialog boxes prO¿°dONLNd˙âï})fovided by the Printing Manager_°dONLNdâ}ïÛ)ç, or you can customize the °dONLNd3ïä°´(ûästandar±Ä°dONLNd:ï´°)!d dialog boxes. Ω °dONLNdJï°ˆ)EY}†°dONLNdKB)ou can copy the rU@°dONLNd\ïB°È)L(esults of one job dialog box to several °dONLNdѰä≠∂(™äAdocuments when the user wants to print several documents at once..°dONLNdΔ≥äøû*The ,
  1243. Courier°dONLNd ≥ûø‡) PrStlDialog°dONLNd’≥‡øı)B and °dONLNd⁄≥ıø7) PrJobDialog°dONLNdÂ≥7øæ)B functions display the standarR`°dONLNd≥æø)ád style and job °dONLNdøäÀ€(»ädialog boxes. The °dONLNd%ø€À)Q    PrDlgMain°dONLNd.øÀg)6 function, using the °dONLNdCøgÀù)V    PrStlInit°dONLNdLøùÀ≤)6 and °dONLNdQø≤ÀË)    PrJobInit°dONLNdZøËÀÍ)6 .°dONLNd[Àä◊W(‘ä.functions, allows you to customize the standarÍ@°dONLNdâÀW◊˙)Õ&d style and job dialog boxes for your °dONLNdØ◊ä„¿(‡äapplication. .°dONLNdΩÈäıû*The °dONLNd¡Èûı⁄)
  1244. PrJobMerge°dONLNdÀÈ⁄ıÊ)< prR`°dONLNdŒÈÊı) ocedur$¿°dONLNd‘Èı    )?e allows you to use one job dialog box for several print jobs, .°dONLNdıäg(˛ä1such as when the user prints several documents frs °dONLNdDıg•)›om the Finder˝Ä°dONLNdQı§©)=. 
  1245. 1H942H9 2H2
  1246. ˇ·ˇ‚7^ °dONLNdU$H2é(.HPrStlDialog  "İdONLNdb$è2í)G ˇˇˇˇˇˇ(.1
  1247. .°dONLNddCäO≥(Lä    Call the °dONLNdmC≥Oı)) PrStlDialog°dONLNdxCıO)BA function displays a style dialog box, which the user can use to .°dONLNdπOä[‹(XäKspecify the page dimensions and other information needed for a page setup. .°dONLNdgäs™*0FUNCTION PrStlDialog (hPrint: THPrint): Boolean;°dONLNd6äãÆ*hPrint.°dONLNd=Ãã8)BThe handle to the specifi؆°dONLNdV8ãa)l
  1248. ed print rJ‡°dONLNd`bãt)*ecorø@°dONLNddtã‡)d, which may be a new r¿°dONLNd{·ãÛ)mecorç °dONLNdÛã)d or an °dONLNdáãÃó
  1249. (îÃexisting one frL@°dONLNdñã óR)?om a document.°dONLNd•±H∫Å(∏H DESCRIPTION
  1250. °dONLNd±¿äÃÙ+BUThe Printing Manager takes the initial settings displayed in the style dialog box  fr≤İdONLNd¿ÙÃ(…Ùom the .°dONLNdÃäÿß(’äprint rR`°dONLNdÃßÿπ)ecor$¿°dONLNdÃπÿ    )d. If the user confi$¿°dONLNd,à   ÿs)Prms the dialog box, the $¿°dONLNdDÃsÿµ)j PrStlDialog$¿°dONLNdOõÿ·)B  function r˜ °dONLNdZÇÿ˝)+eturns .°dONLNdaÿä‰M(·ä*TRUE, and the Printing Manager saves the r[¿°dONLNdãÿM‰Ì)√&esults of the dialog box in the specifi °dONLNd≤ÿÓ‰)°    ed print ˇˇøD.°dONLNdª‰äé(ÌärR`°dONLNdº‰é†)ecor$¿°dONLNd¿‰†„)d and calls the ˇˇ=Ã!–°dONLNd–‰‰ )D
  1251. PrValidateˇˇøD!–°dONLNd⁄‰ Æ)<! function. Otherwise, the print r∞ѰdONLNd˚‰Æ¿)éecorlj°dONLNdˇ‰¿)d is left unchanged .°dONLNd丟(˘äand the function rù¿°dONLNd%Ÿ¸˝)Oeturns F†°dONLNd-˝¸)$ALSE. °dONLNd4Ho(HASSEMBLfl°dONLNd;n–)&Y LANGUAGE INFORMAðdONLNdM–Â)bTION
  1252. .°dONLNdR%ä1¢(.äThe rR`°dONLNdW%¢1)outine selector for the R`°dONLNdo%1H)d PrStlDialogR`°dONLNdz%H1∞)B function is $2A040484.     .°dONLNdì5ä@è(=äTÄ–°dONLNdî5è@∫)    rap macro°dONLNdü5@)ãTÄ–°dONLNd†5@-)rap
  1253. .°dONLNd§CäO¥(Lä_PrGlue.°dONLNd≠CO9)ê$A8FD
  1254. Há4ÄHá ÄHÄ
  1255. ˇ·ˇ‚7^ °dONLNd¥rHÄé(|H PrJobDialog |İdONLNd¿rèÄí)G ˇˇˇˇˇˇ(|1
  1256. .°dONLNd¬ëäùë(öäYï°dONLNd√ëêù”)ou can call the ï°dONLNd”ë”ù)C PrJobDialogï°dONLNdfiëùR)B function to prg`°dONLNdÌëRù)=+oduce a job dialog box, which the user can .°dONLNdùä©(¶ä"use to determine the print qualityˆ°dONLNd:ù©À)ì*, the range of pages to print, and so on. ˇF@ˇ ˇˇˇˇ@
  1257. ˇ·ˇ‚7^
  1258. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1259. (‡*1 )-c)44    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  1260. Courier
  1261. .°dONLNd\lhÜ(el/FUNCTION PrJobDialog(hPrint: THPrint): Boolean;°dONLNd0tlÄê*hPrint.°dONLNd7tÆÄ)BThe handle to the specifi؆°dONLNdPtÄC)l
  1262. ed print rJ‡°dONLNdZtDÄV)*ecorø@°dONLNd^tVĬ)d, which may be a new r¿°dONLNdut√Ä’)mecorç °dONLNdyt’Ĉ)d or an °dONLNdÅÄÆåÏ(âÆexisting one frL@°dONLNdêÄÌå4)?om a document.°dONLNdü¶*Øc(≠* DESCRIPTION
  1263. °dONLNd´µl¡e+B:The printer driver shows the default settings for the curr¸ °dONLNdµe¡ı)˘#ent printer in the job dialog box. °dONLNd¡lÕ∞( lIf the user confiT°dONLNd¡±Õ“)EArms the dialog box, the Printing Manager updates both the print r†°dONLNdZ¡”ÕÂ( ”ecorɰdONLNd^¡ÂÕÌ)d .°dONLNd`ÕlŸ∑(÷land the printer rR`°dONLNdqÕ∑ŸŒ)Kesour$¿°dONLNdvÕŒŸ‡)ce fi$¿°dONLNd{Õ‡Ÿ()le and calls the $¿°dONLNdåÕ(Ÿd)H
  1264. PrValidate$¿°dONLNdñÕdŸ¥)< function, and the $¿°dONLNd©Õ¥Ÿˆ)P PrJobDialog$¿°dONLNd¥ÕˆŸ¯)B .°dONLNdµŸlÂó(‚l
  1265. function r”@°dONLNdøŸóÂ4)+#eturns TRUE. Otherwise, the print rû@°dONLNd‚Ÿ5ÂG)ûecor†°dONLNdÊŸHÂô)d and the printer rk°dONLNd˘Ÿô±)Qesour≥@°dONLNd˛Ÿ±Â¬)ce fiy‡°dONLNdŸ√Â÷)le arp‡°dONLNdŸ÷ÂÓ)e left °dONLNdÂlÒÔ(Ólunchanged and the function r}¿°dONLNd+ÂÔÒ)Éeturns F„†°dONLNd3ÂÒ0)#ALSE. .°dONLNd:˜là(lIf the °dONLNdA˜à ) PrJobDialog°dONLNdL˜ ˆ)B  function rR`°dONLNdW˜ˆp),eturns TRUE, you should pr$¿°dONLNdq˜p∫)zoceed with the r˜ °dONLNdŘπ‚)I    equested .°dONLNdäl¬( lprinting operation. °dONLNdü)*2Q(0*ASSEMBLfl°dONLNd¶)P2≤)&Y LANGUAGE INFORMAðdONLNd∏)≤2«)bTION
  1266. .°dONLNdΩ8lDÑ(AlThe rR`°dONLNd¬8ÑDË)outine selector for the R`°dONLNd⁄8ËD*)d PrJobDialogR`°dONLNdÂ8*Dè)B function is $32040488.     .°dONLNd˛HlSq(PlTÄ–°dONLNdˇHqSú)    rap macro°dONLNd
  1267. H¸S)ãTÄ–°dONLNd HS)rap
  1268. .°dONLNdVlbñ(_l_PrGlue.°dONLNdV¸b)ê$A8FD
  1269. í*ö¯4ì*ö¯ ì*ì˛
  1270. ˇ·ˇ‚7^ °dONLNdÖ*ìj(è*
  1271. PrDlgMain z@°dONLNd)Ökìz)A     ˇˇˇˇˇˇ(èÚ1
  1272. .°dONLNd/§l∞ë(≠lUse the °dONLNd7§ë∞«)%    PrDlgMain°dONLNd@§«∞–)6> function to display a style or job dialog box after you have .°dONLNd~∞lº¨(πlcustomized it. .°dONLNdé»l‘Ú*AFUNCTION PrDlgMain (hPrint: THPrint; pDlgInit: PDlgInitProcPtr): °dONLNd⁄÷Í‚+~Boolean;°dONLNd„Ól˙ê(˜lhPrint.°dONLNdÍÓÆ˙)BThe handle to the specifi؆°dONLNdÓ˙C)l
  1273. ed print rJ‡°dONLNdÓD˙V)*ecorø@°dONLNdÓV˙¬)d, which may be a new r¿°dONLNd(Ó√˙’)mecorç °dONLNd,Ó’˙ˆ)d or an °dONLNd4˙ÆÏ(Æexisting one frL@°dONLNdC˙Ì4)?om a document.°dONLNdR
  1274. lë(lpDlgInit°dONLNd[
  1275. Ƶ)BA∫†°dONLNd\
  1276. µ7)  pointer to an initialization pr @°dONLNd|
  1277. 7U)ÇoceduraİdONLNdÇ
  1278. V’)e for one of the two Printing °dONLNd†Æ"ƒ(Æ?Manager printing dialog boxes, or to your own initialization pr˚‡°dONLNdflƒ"‚(ƒocedurì °dONLNd„"Ï)e. °dONLNdÈ<*Ec(C* DESCRIPTION
  1279. .°dONLNdıKlWs+BYï°dONLNdˆKrW±)ou can use the ï°dONLNdK±WÁ)?    PrDlgMainï°dONLNdKÁWÚ)6@ function to set up a printing dialog box, or you can initalize °dONLNdNWlcH(`l3the style or job dialog box yourself and then send °dONLNdÅWHc~)‹    PrDlgMain°dONLNdäW~cÿ)6 your initialization .°dONLNdücloñ(ll
  1280. function. .°dONLNd™ulÅP*4The printing dialog boxes initialization functions, °dONLNdfiuPÅÜ)‰    PrStlInit°dONLNdÁuÜÅõ)6 and °dONLNdÏuõÅ—)    PrJobInit°dONLNdıu—ÅÚ)6    , set up °dONLNd˛Ålç¬(älthe dialog box in a °dONLNdŬçÊ)VTPrDlg°dONLNdÅÊçÏ)$ rR`°dONLNdÅÏç˛)ecor$¿°dONLNdŞçC)d (described on $¿°dONLNd.ÅCçd)Epage 1-$¿°dONLNd5Ådçn)!39$¿°dONLNd7ÅnçÙ)
  1281. ), which contains pointers for .°dONLNdVçlôª(ñlthe dialog event fi(İdONLNdiçºô˚)Plter and the pr! °dONLNdxç˚ô)?ocedur∏`°dONLNd~çô€).e for evaluating the items of the dialog box, °dONLNd¨ôl•…(¢lincluding your own. ˇx@ˇ ˇˇˇˇ@
  1282. ˇ·ˇ‚7^
  1283. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1284. ~¿(‡1‡)-a¿)45(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿°dONLNd\Heo(cHASSEMBLfl°dONLNd\ne–)&Y LANGUAGE INFORMAðdONLNd\–eÂ)bTION
  1285. .°dONLNdkäw¢(täThe rR`°dONLNd#k¢w)outine selector for the ,
  1286. CourierR`°dONLNd;kw<)d    PrDlgMainR`°dONLNdDk<w§)6 function is $4A040894.     .°dONLNd]{äÜè(ÉäTÄ–°dONLNd^{èÜ∫)    rap macro°dONLNdi{Ü)ãTÄ–°dONLNdj{Ü-)rap
  1287. .°dONLNdnâäï¥(íä_PrGlue.°dONLNdwâï9)ê$A8FD°dONLNd}ØH∏o(∂HSEE ALSO
  1288. °dONLNdÜæä ≠+BFor mor¿°dONLNdçæÆ ¡)$?e information about customizing style or job dialog boxes, see - °dONLNdÃæ¡ («¡“Altering the Style °dONLNd‡ ä÷ (”äor Job Dialog Box” on page 1-{@°dONLNd˝ ÷)É23{@°dONLNdˇ ÷)
  1289. .
  1290. H4H H
  1291. ˇ·ˇ‚7^ °dONLNd˘Hz(H
  1292. PrStlInit ðdONLNd ˘z})2 ˇˇˇˇˇˇ(1
  1293. .°dONLNdä$û(!äThe °dONLNdû$‘)    PrStlInit°dONLNd‘$)6  function rR`°dONLNd&$Ï),7eturns a pointer to the style dialog box (described on R`°dONLNd]Ï$)Ïpage .°dONLNdb$ä0í(-ä1-”‡°dONLNdd$í0ó)7”‡°dONLNde$ó0n)0) in memory but does not display the dialog box..°dONLNdñ<äHû(Eä.FUNCTION PrStlInit (hPrint: THPrint): TPPrDlg;°dONLNd≈Tä`Æ*hPrint.°dONLNdÃTÃ`8)BThe handle to the specifi؆°dONLNdÂT8`a)l
  1294. ed print rJ‡°dONLNdÔTb`t)*ecorø@°dONLNdÛTt`‡)d, which may be a new r¿°dONLNd
  1295. T·`Û)mecorç °dONLNdTÛ`)d or an °dONLNd`Ãl
  1296. (iÃexisting one frL@°dONLNd%` lR)?om a document.°dONLNd4ÜHèÅ(çH DESCRIPTION
  1297. .°dONLNd@ïä°ë+BYï°dONLNdAïê°⁄)ou pass the addrg`°dONLNdQï⁄°)J ess of the g`°dONLNd\ï°<),    PrStlInitg`°dONLNdeï<°Å)6 function in the g`°dONLNdvï۱)EpDlgInitg`°dONLNd~ï±°)0 parameter of the °dONLNdê°ä≠¿(™ä    PrDlgMain°dONLNdô°¿≠N)6! function, which is described on °dONLNd∫°N≠o)épage 1-°dONLNd¡°o≠y)!44°dONLNd√°y≠í)
  1298. . The °dONLNd…°í≠»)    PrStlInit°dONLNd“°»≠Ù)6  function rR`°dONLNd›°Ù≠),eturns .°dONLNd‰≠äπ5(∂ä)a pointer to a printing style dialog box.°dONLNd”H‹o(⁄HASSEMBLfl°dONLNd”n‹–)&Y LANGUAGE INFORMAðdONLNd'”–‹Â)bTION
  1299. .°dONLNd,‚äÓ¢(ÎäThe rR`°dONLNd1‚¢Ó)outine selector for the R`°dONLNdI‚Ó<)d    PrStlInitR`°dONLNdR‚<Ó•)6 function is $3C04040C.     .°dONLNdkÚä˝è(˙äTÄ–°dONLNdlÚè˝∫)    rap macro°dONLNdwÚ˝)ãTÄ–°dONLNdxÚ˝-)rap
  1300. .°dONLNd|ä ¥(    ä_PrGlue.°dONLNdÖ 9)ê$A8FD°dONLNdã&H/o(-HSEE ALSO
  1301. °dONLNdî5äA≠+BFor mor¿°dONLNdõ5ÆA¡)$?e information about customizing style or job dialog boxes, see - °dONLNd⁄5¡A(>¡“Altering the Style °dONLNdÓAäM (Jäor Job Dialog Box” on page 1-{@°dONLNd AM)É23{@°dONLNdAM)
  1302. .
  1303. }HÖ4~HÖ ~H~
  1304. ˇ·ˇ‚7^ °dONLNdpH~}(zH
  1305. PrJobInit &°dONLNdp~~Å)6 ˇˇˇˇˇˇ(z1
  1306. .°dONLNdèäõû(òäThe °dONLNd èûõ‘)    PrJobInit°dONLNd)è‘õ)6  function rR`°dONLNd4èõ·),5eturns a pointer to the job dialog box (described on R`°dONLNdiè·õ)·page 1-R`°dONLNdpèõ)!7R`°dONLNdqèõ)) .°dONLNdsõäß](§ä/in memory but does not display the dialog box. .°dONLNd£≥äøû*.FUNCTION PrJobInit (hPrint: THPrint): TPPrDlg;ˇ*@ˇ ˇˇˇˇ@
  1307. ˇ·ˇ‚7^
  1308. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1309. (‡*1 )-c)46    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  1310. Courier
  1311. .°dONLNd\lhê(elhPrint.°dONLNd\Æh)BThe handle to the specifi؆°dONLNd \hC)l
  1312. ed print rJ‡°dONLNd*\DhV)*ecorø@°dONLNd.\Vh¬)d, which may be a new r¿°dONLNdE\√h’)mecorç °dONLNdI\’hˆ)d or an °dONLNdQhÆtÏ(qÆexisting one frL@°dONLNd`hÌt4)?om a document.°dONLNdoé*óc(ï* DESCRIPTION
  1313. .°dONLNd{ùl©s+BYï°dONLNd|ùr©º)ou pass the addrg`°dONLNdåùº©Ë)J ess of the g`°dONLNdóùË©),    PrJobInitg`°dONLNd†ù©c)6 function in the g`°dONLNd±ùc©ì)EpDlgInitg`°dONLNdπù쩉)0 parameter of the °dONLNdÀ©lµ¢(≤l    PrDlgMain°dONLNd‘©¢µ0)6! function, which is described on °dONLNdı©0µQ)épage 1-°dONLNd¸©Qµ[)!44°dONLNd˛©[µt)
  1314. . The °dONLNd©tµ™)    PrJobInit°dONLNd©™µ÷)6  function rR`°dONLNd©÷µÛ),eturns .°dONLNdµl¡(æl'a pointer to a printing job dialog box.°dONLNdG€*‰Q(‚*ASSEMBLfl°dONLNdN€P‰≤)&Y LANGUAGE INFORMAðdONLNd`€≤‰«)bTION
  1315. .°dONLNdeÍlˆÑ(ÛlThe rR`°dONLNdjÍшË)outine selector for the R`°dONLNdÇÍˈ)d    PrJobInitR`°dONLNdã͈É)6 function is $44040410.     .°dONLNd§˙lq(lTÄ–°dONLNd•˙qú)    rap macro°dONLNd∞˙¸)ãTÄ–°dONLNd±˙)rap
  1316. .°dONLNdµlñ(l_PrGlue.°dONLNdæ¸)ê$A8FD°dONLNdƒ.*7Q(5*SEE ALSO
  1317. °dONLNdÕ=lIè+BFor mor¿°dONLNd‘=êI£)$?e information about customizing style or job dialog boxes, see - °dONLNd=£I¯(F£“Altering the Style °dONLNd'IlUÓ(Rlor Job Dialog Box” on page 1-{@°dONLNdDIÔU˘)É23{@°dONLNdFI˘U˚)
  1318. .
  1319. Ö*ç¯4Ü*篠Ü*ܲ
  1320. ˇ·ˇ‚7^ °dONLNdIx*Üo(Ç* PrJobMerge Ä¿°dONLNdTxoÜr)E ˇˇˇˇˇˇ(ÇÚ1
  1321. .°dONLNdVól£s(†lYï°dONLNdWór£±)ou can use the ï°dONLNdfó±£Ì)?
  1322. PrJobMergeï°dONLNdpóÌ£˘)< prg`°dONLNdsó˘£) ocedur9¿°dONLNdyó£Â)1e to display a job dialog box just once and then .°dONLNd™£lØ$(¨l+copy the job information to several print r"‡°dONLNd’£%Ø7)πecoró@°dONLNdŸ£7؈)+ds, which means that you can print several °dONLNdØlªû(∏lEdocuments with one dialog box. This is useful when the user prints frÁ`°dONLNdIØûª‹(∏ûom the Finderq¿°dONLNdVØ‹ª·)>. .°dONLNdY«l”‡(–l>PROCEDURE PrJobMerge (hPrintSrc: THPrint;hPrintDst: THPrint); °dONLNdòfll΢*    hPrintSrc.°dONLNd¢flÆΛ)B The print rÒ†°dONLNd≠fl›ÎÔ)/ecorf°dONLNd±flΡ)d fr†°dONLNdµflÎ>)om the Finder•°dONLNd¬fl=Î?)=..°dONLNdƒÔl˚¢(¯l    hPrintDst.°dONLNdŒÔÆ˚›)B The print rÒ†°dONLNdŸÔ›˚Ô)/ecorf°dONLNd›Ô˚ˇ)d fr†°dONLNd·Ô˚R)om the document. °dONLNdÛ*c(* DESCRIPTION
  1323. .°dONLNdˇ$l0Ä+BThe °dONLNd$Ä0º)
  1324. PrJobMerge°dONLNd$º0»)< prR`°dONLNd$»0Â) ocedur$¿°dONLNd$Â0Û)e fi$¿°dONLNd$Û0+)rst calls the $¿°dONLNd($+0g)8
  1325. PrValidate$¿°dONLNd2$g0Ó)<! function for each of the  print °dONLNdS0l<p(9lrR`°dONLNdT0p<Ç)ecor$¿°dONLNdX0Ç<Õ)ds named by the $¿°dONLNdh0Õ<)K    hPrintSrc$¿°dONLNdq0<)6 and $¿°dONLNdv0<N)    hPrintDst$¿°dONLNd0N<ı)6' parameters. It then copies all of the °dONLNd¶<lHÀ(Elinformation set as a rR`°dONLNdº<ÀH=)_esult of a job dialog box fr$¿°dONLNdÿ<=H^)rom the $¿°dONLNdfl<^Hî)!    hPrintSrc$¿°dONLNdË<îHÂ)6 parameter to the °dONLNd˙HlT¢(Ql    hPrintDst°dONLNdH¢T˛)6 parameter while prR`°dONLNdH˛Tˆ)\9eserving the values set by the style dialog box for that °dONLNdOTl`â(]lprint rR`°dONLNdVTâ`õ)ecor$¿°dONLNdZTõ`o)0d (for instance, landscape orientation). Finally    °dONLNdäTn`Ö)”, the     °dONLNdêTÖ`¡)
  1326. PrJobMerge    °dONLNdöT¡`Õ)< pr€`°dONLNdùTÃ`È) ocedur≠¿°dONLNd£TÈ`)e ˇˇkh°dONLNd•`lló(il    makes surΩ»°dONLNdÆ`ól€)+e that all the fikh°dONLNdø`‹l()Eelds of the print rÎh°dONLNd“`(l:)LecorΩ»°dONLNd÷`:l~)d named by the ˇ˛B8kh°dONLNdÂ`lµ)E    hPrintDstˇˇkhkh°dONLNdÓ`µlÒ)6 parameter arò°dONLNd˚`Úl¯)=e °dONLNd˝llx„(ulinternally self-consistent. R`°dONLNdl„xÍ)wYg`°dONLNdlÈx )ou must call g`°dONLNd'l x\)7
  1327. PrJobMergeg`°dONLNd1l\xÙ)<" for each document the user wants .°dONLNdSxlÑ∏(Ålto print; howeverµ`°dONLNddx∏ÑÜ)L., it can only make one copy of each document. 
  1328. ß*∏¯4®*∏¯"®*_
  1329. ˇ·ˇ‚7^    °dONLNdˇˇ(•l
  1330. Figure 1-6ˇΔ@ˇ ˇˇˇˇ@
  1331. ˇ·ˇ‚7^
  1332. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1333. ~¿(‡1‡)-a¿)47(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿°dONLNd\Heo(cHASSEMBLfl°dONLNd\ne–)&Y LANGUAGE INFORMAðdONLNd\–eÂ)bTION
  1334. .°dONLNdkäw¢(täThe rR`°dONLNd#k¢w)outine selector for the ,
  1335. CourierR`°dONLNd;kwB)d
  1336. PrJobMergeR`°dONLNdEkBwN)< pr$¿°dONLNdHkNwk) ocedur˜ °dONLNdNkjw∞)e is $5804089C.     .°dONLNd_{äÜè(ÉäTÄ–°dONLNd`{èÜ∫)    rap macro°dONLNdk{Ü)ãTÄ–°dONLNdl{Ü-)rap
  1337. .°dONLNdpâäï¥(íä_PrGlue.°dONLNdyâï9)ê$A8FD
  1338. πH¡4∫H¡ ∫H∫
  1339. ˇ·ˇ‚7^ °dONLNd¨H∫s(∂HPrintingˇˇˇˇˇˇ(∂1
  1340. °dONLNdà¡äÕÉ( ä7In addition to opening and closing the Printing Managerâ °dONLNdø¡ÉÕ    )˘, you must open and close the °dONLNd›ÕäŸõ(÷ä:document being printed and each page of the document beforæ°dONLNdÕõŸ˛(÷õe you can print it. The .°dONLNd/Ÿä¿(‚ä    PrOpenDoc°dONLNd8Ÿ¿Â˚)6 function and °dONLNdFŸ˚Â7);
  1341. PrCloseDoc°dONLNdPŸ7ÂC)< prR`°dONLNdSŸCÂ`) ocedur$¿°dONLNdYŸ`Â)$es open and close the document, and °dONLNd}ÂäÒú(Óäthe °dONLNdÅÂúÒÿ)
  1342. PrOpenPage°dONLNdãÂÿÒÌ)< and °dONLNdêÂÌÒ/) PrClosePage°dONLNdõÂ/Ò;)B prR`°dONLNdûÂ;ÒX) ocedur$¿°dONLNd§ÂXÒ»)es open and close the curr˜ °dONLNdæÂ«Ò)o    ent page.°dONLNd»˜äë(äYï°dONLNd…˜ê’)ou must use the ï°dONLNdŸ˜’ )E    PrPicFileï°dONLNd‚˜ )6 prg`°dONLNd˜4) ocedur9¿°dONLNdΘ4ï)e to complete a deferr  °dONLNd˜ï‚)aed printing. TherfiİdONLNd˜·˛)Le is no .°dONLNdäˇ( äspecial Printing Manager r‚°dONLNd4ˇú)u$outine for immediate printing; the r&†°dONLNdXù
  1343. )ûoutines you use to draw .°dONLNdpä (äthe document in the printing °dONLNdç <)ÇgrafPort°dONLNdï<—)0 print the document immediatelyd@°dONLNd¥–’)î. 
  1344. KHS4LHS LHL
  1345. ˇ·ˇ‚7^ .°dONLNd∏>HLé(HH PrOpenDoc  $°dONLNd√>èLí)G ˇˇˇˇˇˇ(H1
  1346. .°dONLNd≈]äiØ(fäUse the °dONLNdÕ]ØiÂ)%    PrOpenDoc°dONLNd÷]Âiv)6# function to initialize a printing °dONLNd˘]vi¶)ëgrafPort°dONLNd]¶i)0 for use in printing a .°dONLNdiäu(rädocument, make it the curr‡°dONLNd2iuA)xent port, and rZ°dONLNdAiAuô)?eturn a pointer to it..°dONLNdXÅäç
  1347. (ää@FUNCTION PrOpenDoc (hPrint: THPrint; pPrPort: TPPrPort; pIOBuf: °dONLNd£èõb+~Ptr): TPPrPort;°dONLNd≥ßä≥Æ(∞ähPrint.°dONLNd∫ßÃ≥/)BThe handle to a print rö°dONLNd—ß/≥A)cecor`°dONLNd’ßB≥Æ)d, which may be a new rg‡°dONLNdÏ߯≥¿)lecor‹@°dONLNdß¿≥)d or an existing °dONLNd≥ÃøÂ(ºÃone fr)`°dONLNd≥Êø-)om a document..°dONLNd√䜥(ÃäpPrPort°dONLNd√Ü‘)BAÛ`°dONLNd√”œ<) pointer to the printing Û`°dONLNd8√<œl)igrafPortÛ`°dONLNd@√lœÁ)0. This parameter should be Û`°dONLNd[√Áœ˘){NILÛ`°dONLNd^√˘œ˛), ˇˇË∫°dONLNd`œÃ€ (ÿÃwhich means that ˇˇ∫.:.°dONLNdqœ!€W)U    PrOpenDocˇˇË∫:.°dONLNdzœW€«)6 allocates a new printing ˇˇ∫.≈–°dONLNd€˜)pgrafPortˇˇË∫≈–°dONLNdúœ˜€)0 in the .°dONLNd§€ÃÁÊ(‰Ãheap. .°dONLNd´Îä˜Æ(ÙäpIOBuf.°dONLNd≤ÎØ”)BA∫†°dONLNd≥Δ˜) pointer to an ar8‡°dONLNdƒÎ˜Ô)G.ea of memory to be used as an input/output buf °dONLNdÚÎÔ˜˚)’fer¿°dONLNdıÎ˚˜) . This ˇˇ∫..°dONLNd¸˜Ãñ(Ã*parameter should be NIL, which means that ˇˇ.äóB°dONLNd&˜ñÃ)     PrOpenDocˇˇ∫.óB°dONLNd/˜Ã)6 uses the volume .°dONLNd@Ã⁄( Ãbuf5°dONLNdC€))fer for the spool fi˝¿°dONLNdW)fi)N)le’s volume. If you allocate your own buf.¿°dONLNdÄflÎ)∂ferÅİdONLNdÉÍ)
  1348. , it must °dONLNdçÃ#(Ãbe 522 bytes exactly±†°dONLNd°"')V. °dONLNd§5H>Å(<H DESCRIPTION
  1349. .°dONLNd∞DäP+B Depending on the setting of the °dONLNd–DPO)è    bJDocLoop°dONLNdŸDOPX)6 fi°dONLNd‹DXPÕ)    eld in the printing job subrR`°dONLNd¯DÕPfl)uecor$¿°dONLNd¸DflP¸)d, the ˇˇ‹ °dONLNdPä\3(Yä&Printing Manager sets up the printing ˇˇî`®¿°dONLNd)P3\c)©grafPortˇˇ‹ ®¿°dONLNd1Pc\Œ)0 for immediate or deferrΆ°dONLNdIPŒ\)ked printing. For .°dONLNdZ\äh§(eädeferr:İdONLNd`\•h.)!ed printing, it takes the spool fiŸ °dONLNdÇ\.hÑ)âle’s name, volume rl@°dONLNdï\Öhï)Wefer`°dONLNdô\ñhœ) ence number†@°dONLNd§\Œh    )8, and version °dONLNd≤hät∂(qä    number fr    @°dONLNdªh∑t")-om the printing job subrNİdONLNd”h"t4)kecor¬‡°dONLNd◊h4t?)d. .°dONLNd€zäÜ(ÉäBecause both the printing °dONLNdızÜ0)vgrafPort°dONLNd˝z0Üè)0 and input/output bufR`°dONLNdzèÜ®)_fer ar$¿°dONLNdz®Ü¬)e nonr˜ °dONLNdz¡Ü)elocatable objects, °dONLNd2Üäíj(èä1you may want to allocate them yourself using the °dONLNdcÜjíî)‡pPrPort°dONLNdjÜîí©)* and °dONLNdoÜ©íÕ)pIOBuf°dONLNduÜÕí)$ parameters, to .°dONLNdÖíäû    (õäavoid fragmenting the heap. .°dONLNd¢§ä∞ë*Yï°dONLNd£§ê∞ˇ)ou must balance a call to ï°dONLNdΩ§ˇ∞5)o    PrOpenDocï°dONLNdΔ§5∞w)6 with a call to ï°dONLNd÷§w∞≥)B
  1350. PrCloseDocï°dONLNd‡§≥∞∂)<.ˇΔ@ˇ ˇˇˇˇ@
  1351. ˇ·ˇ‚7^
  1352. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1353. (‡*1 )-c)48    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯°dONLNd\*eQ(c*ASSEMBLfl°dONLNd\Pe≤)&Y LANGUAGE INFORMAðdONLNd\≤e«)bTION
  1354. .°dONLNdklwÑ(tlThe rR`°dONLNd#kÑwË)outine selector for the ,
  1355. CourierR`°dONLNd;kËw)d    PrOpenDocR`°dONLNdDkwÖ)6 function is $04000C00.     .°dONLNd]{lÜq(ÉlTÄ–°dONLNd^{qÜú)    rap macro°dONLNdi{¸Ü)ãTÄ–°dONLNdj{Ü)rap
  1356. .°dONLNdnâlïñ(íl_PrGlue.°dONLNdwâ¸ï)ê$A8FD°dONLNd}Ø*∏Q(∂*SEE ALSO
  1357. °dONLNdÜæl +B'For an example of a printing loop, see ·°dONLNd≠æ C)© Listing 1-1å °dONLNd∏æD É)/ beginning on `°dONLNdΔæÑ §)@page 1-6 °dONLNdÕæ§ Æ) 126 °dONLNdœæÆ ≥)
  1358. . 
  1359. ˙*¯4˚*¯ ˚*˚˛
  1360. ˇ·ˇ‚7^ °dONLNd”Ì*˚m(˜* PrCloseDoc $°dONLNdfiÌn˚q)D ˇˇˇˇˇˇ(˜Ú1
  1361. .°dONLNd‡ lë(lUse the °dONLNdË ëÕ)%
  1362. PrCloseDoc°dONLNdÚ ÕŸ)< prR`°dONLNdı Ÿˆ) ocedur$¿°dONLNd˚ ˆY)e to close the printing $¿°dONLNd Yâ)cgrafPort$¿°dONLNd âΩ)0  data type. °dONLNd($l0b(-l)PROCEDURE PrCloseDoc (pPrPort: TPPrPort);°dONLNdR<lHñ*pPrPort°dONLNdZ<ÆH∂)BAÛ`°dONLNd[<µH) pointer to the printing Û`°dONLNdt<HN)igrafPortÛ`°dONLNd|<NHÇ)0  data type. .°dONLNdâb*kc(i* DESCRIPTION
  1363. .°dONLNdïql}Ì+BFor immediate printing, the °dONLNd±qÌ}))Å
  1364. PrCloseDoc°dONLNdªq)}5)< prR`°dONLNdæq5}R) ocedur$¿°dONLNdƒqR}∑)e ends the printing job.°dONLNd›Élèô(ål
  1365. For deferrR`°dONLNdÁÉôè–)-ed printing, R`°dONLNdÙÉ–è )7
  1366. PrCloseDocR`°dONLNd˛É èfi)<. ends the deferment: the document must now be °dONLNd,èlõ¨(òlprinted. BeforR`°dONLNd:è¨õA)@"e printing the document, call the R`°dONLNd\èAõk)ïPrErrorR`°dONLNdcèkõw)* pr$¿°dONLNdfèwõî) ocedur˜ °dONLNdlèìõ¨)e to fi˜ °dONLNdsè¨õÛ)nd out whether .°dONLNdÇõlßú(§lDspooling succeeded. If it did, unload unused code segments  to ensur¿°dONLNdΔõùßÔ(§ùe that you have as .°dONLNdŸßl≥l(∞l8much memory as possible in which to print and then call °dONLNdßl≥¢(∞l    PrPicFile°dONLNdߢ≥ß)6. .°dONLNdÕ*÷Q(‘*ASSEMBLfl°dONLNd$ÕP÷≤)&Y LANGUAGE INFORMAðdONLNd6Õ≤÷«)bTION
  1367. .°dONLNd;‹lËÑ(ÂlThe rR`°dONLNd@‹ÑËË)outine selector for the R`°dONLNdX‹ËË$)d
  1368. PrCloseDocR`°dONLNdb‹$Ë0)< pr$¿°dONLNde‹0ËM) ocedur˜ °dONLNdk‹LËê)e is $08000484.     .°dONLNd|Ïl˜q(ÙlTÄ–°dONLNd}Ïq˜ú)    rap macro°dONLNdàϸ˜)ãTÄ–°dONLNdâϘ)rap
  1369. .°dONLNdç˙lñ(l_PrGlue.°dONLNdñ˙¸)ê$A8FD°dONLNdú *)Q('*SEE ALSO
  1370. °dONLNd•/l;+B'For an example of a printing loop, see ·°dONLNdÃ/;C)© Listing 1-1å °dONLNd◊/D;É)/ beginning on `°dONLNdÂ/Ñ;§)@page 1-6 °dONLNdÏ/§;Æ) 126 °dONLNdÓ/Æ;≥)
  1371. . 
  1372. k*s¯4l*s¯ l*l˛
  1373. ˇ·ˇ‚7^ °dONLNdÚ^*lq(h* PrOpenPage &¿°dONLNd˝^rlu)H ˇˇˇˇˇˇ(hÚ1
  1374. .°dONLNdˇ}lâë(ÜlUse the °dONLNd}ëâÕ)%
  1375. PrOpenPage°dONLNd}ÕâŸ)< prR`°dONLNd}Ÿâˆ) ocedur$¿°dONLNd}ˆâY)e to begin a new page. °dONLNd2ïl°⁄(ûl=PROCEDURE PrOpenPage (pPrPort: TPPrPort; pPageFrame: TPRect);°dONLNdp≠lπñ*pPrPort°dONLNdx≠Æπ∂)BAÛ`°dONLNdy≠µπ) pointer to the printing Û`°dONLNdí≠πN)igrafPortÛ`°dONLNdö≠NπS)0. ˇv@ˇ ˇˇˇˇ@
  1376. ˇ·ˇ‚7^
  1377. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1378. ~¿(‡1‡)-a¿)49(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿,
  1379. Courier
  1380. .°dONLNd\ähΔ(eä
  1381. pPageFrame.°dONLNd \Ãh¯)B
  1382. For deferr±¿°dONLNd\¯ho),ed printing, a pointer to a r˝¿°dONLNd2\oh·)wectangle to be used as the °dONLNdMhÃt(qÃQuickDraw pictur:‡°dONLNd]ht|)Qe frame for this page. °dONLNduéHóÅ(ïH DESCRIPTION
  1383. °dONLNdÅùä©Ô+BUThe page is printed only if it falls within the page range given in the printing job °dONLNd÷©äµù* subr¿°dONLNd⁄©ûµ∞)ecorÖ °dONLNdfi©∞µª)d. °dONLNd‚ªä«(ƒäIf the user has chosen deferrË °dONLNdˇª«Œ)|.ed printing, the Printing Manager scales the rˆÄ°dONLNd-ªŒ«ı)»    ectangle .°dONLNd6«ä”…(–änamed by the °dONLNdC«…”)?
  1384. pPageFrame°dONLNdM«”©)<! parameter (with the QuickDraw prR`°dONLNdn«©”Δ)§ocedur$¿°dONLNdt«Δ”Õ)e $¿°dONLNdv«Õ”) DrawPicture$¿°dONLNdÅ«”)B) °dONLNdÉ”äflÎ(‹äto coincide with the rR`°dONLNdô”Îfl1)aectangle specifiR`°dONLNd©”1flK)Fed by R`°dONLNdØ”Kfli)rPageR`°dONLNd¥”iflÙ)  in the printer information subr$¿°dONLNd‘”Ùfl)ãecor˜ °dONLNdÿ”fl)d. °dONLNd€fläÎâ(Ëä:Unless you want the printout to be scaled, you should set °dONLNdflâÎ≈)ˇ
  1385. pPageFrame°dONLNdfl≈Γ)< to °dONLNd#fl“Ή)NIL°dONLNd&fl‰Î)—this ˇˇÖ¥°dONLNd,Îä˜Ø(Ùä    uses the ˇ˛ëãh°dONLNd5ÎØ˜Õ)%rPageˇˇÖ¥ãh°dONLNd:ÎÕ˜“) r„|°dONLNd<Γ˜1)ectangle as the picturF¯°dONLNdRÎ2˜)`5e frame, so that the page is printed with no scaling.°dONLNdà˝ä    ë(äYï°dONLNdâ˝ê    )ou must balance every call to ï°dONLNdß˝    O)É
  1386. PrOpenPageï°dONLNd±˝O    ë)< with a call to ï°dONLNd¡˝ë    ”)B PrClosePageï°dONLNdÃ˝”    ÿ)B. .°dONLNdœ#H,j(*HSPECIALİdONLNd÷#k,ü)#
  1387.  CONSIDERAİdONLNd‡#û,∏)3TIONS
  1388. ˇˇià.°dONLNdÊ2ä>√(;äThe printing ˇ˛<òS°dONLNdÛ2ƒ>Ù):grafPortˇˇiàS°dONLNd˚2Ù>7)0 is completely rb°dONLNd 27>|)Ceinitialized by ˇ˛<ò5°dONLNd2}>π)F
  1389. PrOpenPageˇˇià5°dONLNd%2π>”)<. Therq°dONLNd+2”>Â)eforC`°dONLNd/2Â>) e, you must °dONLNd;>äJô(Gäset °dONLNd?>ôJ…)grafPort°dONLNdG>…JÁ)0 featurR`°dONLNdN>ÁJ)Aes such as the font family and font size for every page that you .°dONLNdèJäV¸(Sädraw after you call this pr‡°dONLNd™J˝V)socedurú °dONLNd∞JV")e..°dONLNd≥\äh((eä"Don’t call the QuickDraw function °dONLNd’\(hj)û OpenPicture°dONLNd‡\jh)B' while a page is open (after a call to °dONLNdhätΔ(qä
  1390. PrOpenPage°dONLNdhΔtÔ)<
  1391.  but beforR`°dONLNdhÔt))
  1392. e calling R`°dONLNd%htZ)) PrClosePageR`°dONLNd0hZtc)B). $¿°dONLNd3hctj)    Y9¿°dONLNd4hit±)ou can, however|`°dONLNdCh∞t…)G, call |`°dONLNdJh…t ) DrawPicture|`°dONLNdUh t)B .°dONLNdVtäÄΩ(}ä at any time.°dONLNdcöH£o(°HASSEMBLfl°dONLNdjön£–)&Y LANGUAGE INFORMAðdONLNd|ö–£Â)bTION
  1393. .°dONLNdũ䵢(≤äThe rR`°dONLNdÜ©¢µ)outine selector for the R`°dONLNdû©µB)d
  1394. PrOpenPageR`°dONLNd®©BµN)< pr$¿°dONLNd´©Nµk) ocedur˜ °dONLNd±©jµÆ)e is $10000808.     .°dONLNd¬πäƒè(¡äTÄ–°dONLNd√πèƒ∫)    rap macro°dONLNdŒπƒ)ãTÄ–°dONLNdœπƒ-)rap
  1395. .°dONLNd”«ä”¥(–ä_PrGlue.°dONLNd‹«”9)ê$A8FD°dONLNd‚ÌHˆo(ÙHSEE ALSO
  1396. °dONLNdθä3+B'For an example of a printing loop, see ·°dONLNd¸3a)© Listing 1-1å °dONLNd¸b°)/ beginning on `°dONLNd+¸¢¬)@page 1-6 °dONLNd2¸¬Ã) 126 °dONLNd4¸Ã—)
  1397. . 
  1398. 8H@49H@ 9H9
  1399. ˇ·ˇ‚7^ °dONLNd8+H9è(5H PrClosePage &¿°dONLNdD+ê9ì)H ˇˇˇˇˇˇ(51
  1400. .°dONLNdFJäVØ(SäUse the °dONLNdNJØVÒ)% PrClosePage°dONLNdYJÒV˝)B prR`°dONLNd\J˝V) ocedur$¿°dONLNdbJV3)e to fi$¿°dONLNdiJ3V∞)nish the printing of the curr˜ °dONLNdÜJØV⁄)|
  1401. ent page. °dONLNdëbänÜ(kä*PROCEDURE PrClosePage (pPrPort: TPPrPort);°dONLNdºzäÜ¥*pPrPort°dONLNdƒzÃÜ‘)BAÛ`°dONLNd≈z”Ü<) pointer to the printing Û`°dONLNdfiz<Ül)igrafPortÛ`°dONLNdÊzlÜq)0. ˇJ@ˇ ˇˇˇˇ@
  1402. ˇ·ˇ‚7^
  1403. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1404. (‡*1 )-c)50    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯°dONLNd\*ec(c* DESCRIPTION,
  1405. Courier
  1406. .°dONLNd klwÆ+B PrClosePage°dONLNdkÆw])B' tells the Printing Manager that you arR`°dONLNd>k]wh)Øe f"‡°dONLNdAkhw¯)  inished with this page, so that .°dONLNdawlÉ(Äl'the printer driver can do whatever is r7‡°dONLNdàwÉ,)©equirO °dONLNdçw,Éc)ed (such as rê °dONLNdöwcÉÎ)7elease temporary memory) for °dONLNd∑Élèé(ålthe curr `°dONLNdøÉèè’)#ent printer in or  °dONLNd–É’èa)Fder to avoid communication dif¿°dONLNdÓÉaèg)åfi"İdONLNdÉgèµ)culties or other pr®`°dONLNdɵèÎ)N oblems that °dONLNdèlõ¿(òlmay cause the user|@°dONLNd!è¡õ)U’s computer to crash. °dONLNd8µ*æQ(º*ASSEMBLfl°dONLNd?µPæ≤)&Y LANGUAGE INFORMAðdONLNdQµ≤æ«)bTION
  1407. .°dONLNdVƒl–Ñ(ÕlThe rR`°dONLNd[ƒÑ–Ë)outine selector for the R`°dONLNdsƒË–*)d PrClosePageR`°dONLNd~ƒ*–6)B pr$¿°dONLNdŃ6–S) ocedur˜ °dONLNdáƒR–ò)e is $1800040C.     .°dONLNdò‘lflq(‹lTÄ–°dONLNdô‘qflú)    rap macro°dONLNd§‘¸fl)ãTÄ–°dONLNd•‘fl)rap
  1408. .°dONLNd©‚lÓñ(Îl_PrGlue.°dONLNd≤‚¸Ó)ê$A8FD°dONLNd∏*Q(*SEE ALSO
  1409. °dONLNd¡l#+B'For an example of a printing loop, see ·°dONLNdË#C)© Listing 1-1å °dONLNdÛD#É)/ beginning on `°dONLNdÑ#§)@page 1-6 °dONLNd§#Æ) 126 °dONLNd
  1410. Æ#≥)
  1411. . 
  1412. S*[¯4T*[¯ T*T˛
  1413. ˇ·ˇ‚7^ °dONLNdF*Ta(P* PrPicFile  Õ¿°dONLNdFaTd)7 ˇˇˇˇˇˇ(PÚ1
  1414. .°dONLNdelqë(nlUse the °dONLNd#eëq«)%    PrPicFile°dONLNd,e«q”)6 prR`°dONLNd/e”q) ocedur$¿°dONLNd5eqI)e to complete deferr˜ °dONLNdIeHq)Xed printing. °dONLNdW}lâÏ(Ül@PROCEDURE PrPicFil (hPrint: THPrint; pPrPort: TPPrPort; pIOBuf: °dONLNd¢ãÍóÚ+~,Ptr; pDevBuf: Ptr; VAR prStatus: TPrStatus);°dONLNdœ£lØê(¨lhPrint.°dONLNd÷£ÆØ)BThe handle to the specifi؆°dONLNdÔ£ØC)l
  1415. ed print rJ‡°dONLNd˘£DØV)*ecorø@°dONLNd˝£Vج)d, which may be a new r¿°dONLNd£√Ø’)mecorç °dONLNd£’؈)d or an °dONLNd ØÆªÏ(∏Æexisting one frL@°dONLNd/ØÌª4)?om a document..°dONLNd>ølÀñ(»lpPrPort°dONLNdFøÆÀ∂)BAÛ`°dONLNdGøµÀ) pointer to the printing Û`°dONLNd`øÀN)igrafPortÛ`°dONLNdhøNÀ…)0. This parameter should be Û`°dONLNdÉø…À€){NILÛ`°dONLNdÜø€À‡), ˇˇÊf°dONLNdàÀÆ◊(‘Æwhich means that ˇˇ≥232°dONLNdôÀ◊9)U    PrPicFileˇˇÊf32°dONLNd¢À9◊Δ)6  should allocate a new printing ˇˇ≥2ôñ°dONLNd¬ÀΔ◊ˆ)çgrafPortˇˇÊfôñ°dONLNd Àˆ◊˜)0 .°dONLNdÀ◊Æ„‰(‡Æin the heap. .°dONLNdŸÁlÛê(lpIOBuf.°dONLNd‡ÁÆÛµ)BA∫†°dONLNd·ÁµÛ˚) pointer to an ar8‡°dONLNdÚÁ¸Û—)G.ea of memory to be used as an input/output buf °dONLNd Á—Û›)’fer¿°dONLNd#Á›Û˜) . This .°dONLNd*ÛÆˇ(¸Æparameter should be °dONLNd>Ûˇ)_NIL°dONLNdAÛˇy), which means that °dONLNdTÛyˇØ)Z    PrPicFile°dONLNd]ÛØˇÙ)6 should use the .°dONLNdmˇÆ ·(Æ
  1416. volume buf]‡°dONLNdwˇ· /)3fer for the spool fi&†°dONLNdãˇ0 Â)O)le’s volume. If you allocate your own bufW†°dONLNd¥ˇÂ Ò)µfer™`°dONLNd∑ˇ ı) , °dONLNdπ Æ&(Æit must be 522 bytes exactly6‡°dONLNd’ &+)x. .°dONLNdÿl'ñ($lpDevBuf°dONLNd‡Æ'∂)BAÛ`°dONLNd·µ'N)" pointer to a device-dependent buf≈¿°dONLNdN'[)ôfer`°dONLNd['÷). This parameter should be `°dONLNd!÷'Ë){NIL`°dONLNd$Ë'Ì), °dONLNd&'Æ3(0Æwhich means that °dONLNd7'39)U    PrPicFile°dONLNd@'93ö)6 should allocate a bufR`°dONLNdV'ö3„)afer in the heap. .°dONLNdh7lCê(@lprStatus°dONLNdq7ÆCµ)BA∫†°dONLNdr7µC˛) printing status r?@°dONLNdÑ7ˇC)Jecor≥†°dONLNdà7C-)d that %İdONLNdè7.CU)    PrPicFile≠İdONLNdò7UC|)'
  1417.  uses to rı °dONLNd¢7|C∫)'eport on its pra °dONLNd±7ªC…)?ogr*¿°dONLNd¥7 C‹)ess: °dONLNdπCÆO¿(LÆcurrذdONLNdΩC¿O )ent page number@°dONLNdÃC O")K, currI@°dONLNd“C"OG)ent copy‡°dONLNd⁄CGOj)%    , or curr°dONLNd„CjOÄ)#ent fiÉ °dONLNdÈCÄOÕ)le being spooled. ôİdONLNd˚CÕO”)MYZ°dONLNd¸C”OÚ)ou can °dONLNdOÆ[_(XÆ)then display this information to the user∂@°dONLNd,O_[w)±. The Ú°dONLNd2Ow[¢)    TPrStatus†°dONLNd;O£[€), data type is °dONLNdI[ÆgÈ(dÆdescribed on °Ä°dONLNdV[Èg    );page 1-–@°dONLNd][    g) 33–@°dONLNd_[g)
  1418. . °dONLNdbÅ*äc(à* DESCRIPTION
  1419. °dONLNdnêlúË+BIf the user has chosen deferrË °dONLNdãêËúÏ)|<ed printing (for example, to get high-quality output on the .°dONLNd«úl®ì(•lImageW¬†°dONLNdÕúí®Å)&6riter printer), your application should normally call ¬†°dONLNdúÅ®∑)Ô    PrPicFile¬†°dONLNd ú∑®“)6 after °dONLNd®l¥®(±l
  1420. PrCloseDoc°dONLNd®®¥´)<.ˇå@ˇ ˇˇˇˇ@
  1421. ˇ·ˇ‚7^
  1422. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1423. ~¿(‡1‡)-a¿)51(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿°dONLNd\Hej(cHSPECIALİdONLNd\keü)#
  1424.  CONSIDERAİdONLNd\ûe∏)3TIONS
  1425. ˇˇÓ∞.°dONLNdkäw§(täBe surA°dONLNdk•w¸)e not to pass, in the ,
  1426. CourierˇˇÃŸ0°dONLNd3k¸w&)WpPrPortˇˇÓ∞Ÿ0°dONLNd:k&wW)*
  1427.  parameter
  1428. İdONLNdDkXw‰)2!, a pointer to the same printing ˇˇÃëP°dONLNdek‰w)ågrafPortˇˇÓ∞ëP°dONLNdmkw)0 ˇˇJX°dONLNdnwäÉü(Ääyou rú∏°dONLNdswüÉÀ)
  1429. eceived frπp°dONLNd}wÀÉŸ),om ˇ˝fl»°dONLNdÄw⁄É)    PrOpenDocˇˇJX»°dONLNdâwÉï)6 . If that port was allocated by ˇ˝fl 0°dONLNd©wïÉÀ)Ö    PrOpenDocˇˇJX 0°dONLNd≤wÀÉ)6 itself (that is, if ˇˇïT°dONLNd«Éäèõ(åäthe ˇ˛ø¸T°dONLNdÀÉúèΔ)pPrPortˇˇïTT°dONLNd“ÉΔè)* parameter to ˇ˛ø¸’P°dONLNd‡Éè9)=    PrOpenDocˇˇïT’P°dONLNdÈÉ9èN)6 was ˇ˛ø¸ˇ¯°dONLNdÓÉNè`)NILˇˇïTˇ¯°dONLNdÒÉ`è)), then ˇ˛ø¸*†°dONLNd˘ÉÄèº) 
  1430. PrCloseDocˇˇïT*†°dONLNdɺè)< will have disposed .°dONLNdèäõ»(òäLof the port, making your pointer to it invalid. Of course, if you earlier prÀ °dONLNdcè»õ(ò» ovided your .°dONLNdoõäßÃ(§äown storage in °dONLNd~õÃß)B    PrOpenDoc°dONLNdáõß)6, therR`°dONLNdçõß9)e’s no r$¿°dONLNdïõ9ß)/eason you can’t use the same storage again for °dONLNdƒßä≥¿(∞ä    PrPicFile°dONLNdÕß¿≥√)6..°dONLNdœÕH÷o(‘HASSEMBLfl°dONLNd÷Õn÷–)&Y LANGUAGE INFORMAðdONLNdËÕ–÷Â)bTION
  1431. .°dONLNdÌ‹äË¢(ÂäThe rR`°dONLNdÚ‹¢Ë)outine selector for the R`°dONLNd
  1432. ‹Ë<)d    PrPicFileR`°dONLNd‹<ËH)6 pr$¿°dONLNd‹HËe) ocedur˜ °dONLNd‹dË®)e is $60051480.     .°dONLNd-Ïä˜è(ÙäTÄ–°dONLNd.Ïè˜∫)    rap macro°dONLNd9Ϙ)ãTÄ–°dONLNd:Ϙ-)rap
  1433. .°dONLNd>˙ä¥(ä_PrGlue.°dONLNdG˙9)ê$A8FD
  1434. *H24+H2 +H+
  1435. ˇ·ˇ‚7^ °dONLNdMH+≥('HOptimizing Printingˇˇˇˇˇˇ('1
  1436. .°dONLNda2ä>û(;äThe °dONLNde2û>‘)    PrGeneral°dONLNdn2‘>‡)6 prR`°dONLNdq2‡>˝) ocedur$¿°dONLNdw2˝>X)e is a multipurpose r˜ °dONLNdå2W>)Z'outine that allows your application to .°dONLNd≥>äJÂ(Gäachieve the highest ri °dONLNd»>ÂJy)["esolution print output on the curr °dONLNdÍ>zJ©)ï ent printerb@°dONLNdı>®J·)., verify page °dONLNdJäV‰(Säorientation, and incr{†°dONLNdJ‰VÜ)Z#ease performance by avoiding deferrflİdONLNd;JÜV—)¢ed printing. In ori°dONLNdMJ“V    )Lder to select .°dONLNd[Väbi(_ä1which action you want, you pass an opcode in the °dONLNdåVibì)fliOpcode°dONLNdìVìbú)* fi°dONLNdñVúb )     eld of the °dONLNd°V bË).pData°dONLNd¶VËbÍ) °dONLNdßbän„(käparameter of the prR`°dONLNd∫b„n)Yocedur$¿°dONLNd¿bn)e. The $¿°dONLNd«bn<)pData$¿°dONLNdÃb<n⁄)% parameter can point to one of four r˜ °dONLNdÒbŸnÎ)ùecor…İdONLNdıbÎn¸)ds:  °dONLNd˙näzΔ(wä
  1437. TGetRslBlk°dONLNdnΔzÃ)< (°dONLNdnÃzÌ)page 1-°dONLNdnÌz˜)!35°dONLNdn˜z)
  1438. ), °dONLNdnz<)    
  1439. TSetRslBlk°dONLNdn<zB)< (°dONLNdnBzc)page 1-°dONLNd%nczm)!37°dONLNd'nmzv)
  1440. ), °dONLNd*nvz∏)     TGetRotnBlk°dONLNd5n∏zæ)B (°dONLNd7næzfl)page 1-°dONLNd>nflzÈ)!38°dONLNd@nÈz)
  1441. ), and °dONLNdGzäÜÃ(Éä TDftBitsBlk°dONLNdRzÃÜ“)B (°dONLNdTz“ÜÛ)page 1-°dONLNd[zÛÜ˝)!38°dONLNd]z˝Ü)
  1442. ). !†°dONLNd`zÜB)    All of these rÙ°dONLNdnzAÜS);ecorΔ`°dONLNdrzSÜi)ds arò¿°dONLNdwziÜ™)e based on the ò¿°dONLNdÜz™Ü⁄)ATGnlDataò¿°dONLNdéz⁄܇)0 rk °dONLNdêz‡ÜÚ)ecor=İdONLNdîzÚܲ)d (=İdONLNdóz˛Ü) page .°dONLNdúÜäíí(èä1-”‡°dONLNdûÜííú)35”‡°dONLNd†ÜúíΔ)
  1443. ), so the fiƒ`°dONLNd¨Ü«í·)+rst thrè °dONLNd≥Ü‚íÙ)ee fiØ °dONLNd∏ÜÙí3)elds of each ar”İdONLNd«Ü3íl)?e identical.    ø†°dONLNd◊Ümío): .°dONLNdŸòä§£(°äBeforR`°dONLNdfiò£§’) e using the R`°dONLNdÍò’§ )2    PrGeneralR`°dONLNdÛò §)6 pr$¿°dONLNdˆò§4) ocedur˜ °dONLNd¸ò3§Ì)(e, you should determine whether the curr…İdONLNd$ò̧˝)∫ent .°dONLNd(§ä∞(≠ä printer driver supports it. See ¥°dONLNdH§∞≤)Ö#“Checking for PrGeneral” on page 1-º‡°dONLNdk§≤∞º)£16º‡°dONLNdm§º∞æ)
  1444. .°dONLNdo H”o(—HASSEMBLfl°dONLNdv n”–)&Y LANGUAGE INFORMAðdONLNdà –”Â)bTION
  1445. .°dONLNdçŸä¢(‚äThe rR`°dONLNdퟢÂ)outine selector for the R`°dONLNd™ŸÂ<)d    PrGeneralR`°dONLNd≥Ÿ<ÂH)6 pr$¿°dONLNd∂ŸHÂe) ocedur˜ °dONLNdºŸd®)e is $70070480.     .°dONLNdÕÈäÙè(ÒäTÄ–°dONLNdŒÈèÙ∫)    rap macro°dONLNdŸÈÙ)ãTÄ–°dONLNd⁄ÈÙ-)rap
  1446. .°dONLNdfi˜ä¥(ä_PrGlue.°dONLNdÁ˜9)ê$A8FD
  1447. 3H;44H; 4H4
  1448. ˇ·ˇ‚7^ °dONLNdÓ&H4é(0H PrGeneral W    ¿°dONLNd˘&è4=)Gith the GetRslDataOp Opcode   
  1449. õ@°dONLNd'=3?)Æ @°dONLNd'@3B)  õ@°dONLNd&B4E) ˇˇˇˇˇˇ)Œ1
  1450. .°dONLNdEäQØ(NäUse the °dONLNd#EØQÂ)%    PrGeneral°dONLNd,EÂQÒ)6 prR`°dONLNd/EÒQ) ocedur$¿°dONLNd5EQ\)e with the value $¿°dONLNdFE\Q§)N GetRslDataOp$¿°dONLNdRE§Q«)H     for the $¿°dONLNd[E«QÒ)#iOpcode$¿°dONLNdbEÒQ˙)* fi$¿°dONLNdeE˙Q)    eld of .°dONLNdlQä]{(Zä4the parameter block when you want to determine the r"¿°dONLNd†Q|])Ú esolutions available to the curr±‡°dONLNd¿Q])áent °dONLNdƒ]äi®(fäprintero¿°dONLNdÀ]®i≠). .°dONLNdŒuäÅP(~ä!PROCEDURE PrGeneral (pData: Ptr);°dONLNdçäô®*pData°dONLNdˆçÃô‘)BAÛ`°dONLNd˜ç”ô) pointer to the Û`°dONLNdçôQ)B
  1451. TGetRslBlkÛ`°dONLNdçQôW)< r≈¿°dONLNdçWôi)ecorò °dONLNdçiôu)d (ò °dONLNdçuôñ) page 1-ò °dONLNd!çñô†)!35ò °dONLNd#ç†ô©)
  1452. ). ˇ@ˇ ˇˇˇˇ@
  1453. ˇ·ˇ‚7^
  1454. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1455. (‡*1 )-c)52    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯°dONLNd\*ec(c* DESCRIPTION
  1456. .°dONLNd klw +BAfter you call to the ,
  1457. Courier°dONLNd"k w)^    PrGeneral°dONLNd+kw )6 prR`°dONLNd.k w)) ocedur$¿°dONLNd4k)w[) e with the $¿°dONLNd?k[w£)2 GetRslDataOp$¿°dONLNdKk£w€)H opcode, you °dONLNdXwlÉÙ(Älshould check the value in the °dONLNdvwÙÉ)àiError°dONLNd|wÉ!)$ fi°dONLNdw!ÉO)     eld of the °dONLNdäwOÉã).
  1458. TGetRslBlk°dONLNdîwãÉë)< rR`°dONLNdñwëÉ£)ecor$¿°dONLNdöw£ÉÈ)d. The possible °dONLNd™Élèp(ålrR`°dONLNd´Épè¨)esult codes ar$¿°dONLNdπɨèÎ)<e listed below9¿°dONLNd«ÉÍèÔ)>.   °dONLNd…ÉÔèˆ)Y! °dONLNd ÉıèK)ou should also call ! °dONLNdfiÉKèu)VPrError! °dONLNdÂÉuèü)*     (which rÛİdONLNdÓÉûè—)) eturns the r≈‡°dONLNd˙É—èÈ)3esult °dONLNdèlõ(òl(code left by the last Printing Manager rR`°dONLNd(èõî)±outine) after checking the R`°dONLNdCèîõ∏)wiErrorR`°dONLNdIè∏õ¡)$ fiR`°dONLNdLè¡õÏ)     eld, to be .°dONLNdWõlßz(§lsurâ °dONLNdZõzßfl)e that no additional err͇°dONLNdrõflß)eors werı†°dONLNdyõß8)!e generated. °dONLNdá¡* D(»*RESULëİdONLNdå¡D h)T CODES
  1459. .°dONLNdî–l‹ä+(noErr.°dONLNdö–¯‹˝)å0°dONLNdú–‹-)No errE†°dONLNd¢–.‹7)or°dONLNd•€lÁ†(‰l    OpNotImpl°dONLNdØ€¯Á˝)å2°dONLNd±€Á–)+Printer driver does not support this opcode°dONLNd›*    Q(*SEE ALSO
  1460. .°dONLNdÊl~+BSee °dONLNdÍ~Æ) Listing 1-4°dONLNdıƺ)0 on °dONLNd˘º›)page 1-°dONLNd›Á)!19°dONLNdÁ|)
  1461. " for an example of how to use the °dONLNd$|ƒ)ï GetRslDataOp°dONLNd0ƒÚ)H  opcode to .°dONLNd;l'Ÿ($ldetermine what printer r@°dONLNdS⁄')nesolutions arwİdONLNd`'u)8e available for the curr∫ °dONLNdxu'§)c ent printer@°dONLNdɧ'¶)/.
  1462. W*_¯4X*_¯ X*X˛
  1463. ˇ·ˇ‚7^ °dONLNdÜJ*Xp(T* PrGeneral W    ¿°dONLNdëJqX˘)Gith the SetRslOp Opcode
  1464. ı°dONLNd®K˘W˛)à  ı°dONLNd™K˛W) ˇˇˇˇˇˇ )Ù1
  1465. .°dONLNd¨iluë(rlUse the °dONLNd¥iëu«)%    PrGeneral°dONLNdΩi«u”)6 prR`°dONLNd¿i”u) ocedur$¿°dONLNdΔiu>)e with the value $¿°dONLNd◊i>un)NSetRslOp$¿°dONLNdflinuë)0     for the $¿°dONLNdËiëuª)#iOpcode$¿°dONLNdÔiªuƒ)* fi$¿°dONLNdÚiƒuÚ)     eld of the .°dONLNd˝ulÅ/(~l+parameter block  when you want to set the rS°dONLNd(u/Å})√esolution the curr<†°dONLNd:u}Ũ)N ent printerâ¿°dONLNdEu´Å∞).. .°dONLNdHçlô2(ñl!PROCEDURE PrGeneral (pData: Ptr);°dONLNdj•l±ä*pData°dONLNdp•Ʊ∂)BAÛ`°dONLNdq•µ±˜) pointer to the Û`°dONLNdÅ•˜±3)B
  1466. TSetRslBlkÛ`°dONLNdã•3±9)< r≈¿°dONLNdç•9±K)ecorò °dONLNdë•K±W)d (ò °dONLNdî•W±x) page 1-ò °dONLNdõ•x±Ç)!37ò °dONLNdù•DZã)
  1467. ). .°dONLNd°À*‘c(“* DESCRIPTION
  1468. .°dONLNd≠⁄lÊø+BAfter you call the °dONLNd¿⁄øÊı)S    PrGeneral°dONLNd…⁄ıÊ)6 prR`°dONLNdÃ⁄Ê) ocedur$¿°dONLNd“⁄ÊP) e with the $¿°dONLNd›⁄PÊÄ)2SetRslOp$¿°dONLNdÂ⁄ÄÊı)0 opcode, you should check °dONLNdˇÊlÚ∑(Ôlthe value in the °dONLNdÊ∑Ú€)KiError°dONLNdÊ€Ú‰)$ fi°dONLNdʉÚ)     eld of the °dONLNd$ÊÚN).
  1469. TSetRslBlk°dONLNd.ÊNÚT)< rR`°dONLNd0ÊTÚf)ecor$¿°dONLNd4ÊfÚ∞)d. The possible r˜ °dONLNdEÊØÚÎ)Iesult codes ar…İdONLNdSÊÎÚÚ)<e ˇˇïÓ°dONLNdUÚl˛£(˚l listed below*Ó°dONLNdaÚ£˛ß)7. ì<°dONLNdcÚ߲Æ)Y®<°dONLNddÚ≠˛)ou should also call ˇ˛¡ ˇÙ°dONLNdxÚ˛+)TPrErrorˇˇïÓˇÙ°dONLNdÚ+˛T)*     (which r˛0°dONLNdàÚT˛Ü)) eturns the r¸l°dONLNdîÚܲ˜)2esult code left by the last ˇˇœ®°dONLNd∞˛l
  1470. ¿(lPrinting Manager rÒ∞°dONLNd¬˛¿
  1471. 6)Toutine) after checking the ˇˇn¯0P°dONLNd›˛7
  1472. [)wiErrorˇˇœ®0P°dONLNd„˛[
  1473. c)$ fiˇ¯°dONLNdÊ˛c
  1474. ö)eld, to be surAP°dONLNdÙ˛õ
  1475. ¯)8e that no additional .°dONLNd    
  1476. lx(lerr@°dONLNd 
  1477. yö)ors wer °dONLNd
  1478. ö“)!e generated. °dONLNd!0*9D(7*RESULëİdONLNd&0D9h)T CODES
  1479. .°dONLNd.?lKä+(noErr.°dONLNd4?¯K˝)å0°dONLNd6?K-)No errE†°dONLNd<?.K7)or.°dONLNd?JlV¢(Sl    NoSuchRsl.°dONLNdIJ¯V˝)å1°dONLNdKJVE) Requested r @°dONLNdVJFV–)5esolution not supported by the °dONLNdxUa#(^currذdONLNd|U#aÄ)ently selected printer°dONLNdì`ll†(il    OpNotImpl°dONLNdù`¯l˝)å2°dONLNdü`l–)+Printer driver does not support this opcode°dONLNdÀÖ*éQ(å*SEE ALSO
  1480. .°dONLNd‘îl†~+BSee °dONLNdÿî~†Æ) Listing 1-4°dONLNd„îÆ†º)0 on °dONLNdÁ›)page 1-°dONLNdÓÁ)!19°dONLNdîÁ†|)
  1481. " for an example of how to use the °dONLNdî|†¨)ïSetRslOp°dONLNdÈ)0 opcode to set .°dONLNd)†l¨Ä(©lthe r¢`°dONLNd.†Ä¨›)esolution for the curr»°dONLNdD†›¨ )] ent printer °dONLNdO† ¨)/.ˇû@ˇ ˇˇˇˇ@
  1482. ˇ·ˇ‚7^
  1483. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1484. ~¿(‡1‡)-a¿)53(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  1485. jHq4jHq jHj
  1486. ˇ·ˇ‚7^ °dONLNd\Hjé(fH PrGeneral W    ¿°dONLNd \èj&)Gith the GetRotnOp Opcode 
  1487. KİdONLNd$]&i()ó ÀİdONLNd%](i*)  KİdONLNd&\+j.) ˇˇˇˇˇˇ)Â1
  1488. .°dONLNd({äáØ(ÑäUse the ,
  1489. Courier°dONLNd0{ØáÂ)%    PrGeneral°dONLNd9{ÂáÒ)6 prR`°dONLNd<{Òá) ocedur$¿°dONLNdB{á\)e with the value $¿°dONLNdS{\áí)N    GetRotnOp$¿°dONLNd\{íáµ)6     for the $¿°dONLNde{µáfl)#iOpcode$¿°dONLNdl{fláË)* fi$¿°dONLNdo{Ëá)     eld of the .°dONLNdzáäìÈ(êäMparameter block  when you want to determine if the user has chosen landscape °dONLNd«ìäü#* %orientation in the style dialog box. .°dONLNdÌ´ä∑P*!PROCEDURE PrGeneral (pData: Ptr);°dONLNd√䜮*pData°dONLNd√Ü‘)BAÛ`°dONLNd√”œ ) pointer to a Û`°dONLNd$√ œM)8 TGetRotnBlkÛ`°dONLNd/√MœS)B r≈¿°dONLNd1√Sœe)ecorò °dONLNd5√eœq)d (ò °dONLNd8√qœí) page 1-ò °dONLNd?√íœú)!38ò °dONLNdA√úœ•)
  1490. ). .°dONLNdEÈHÚÅ(H DESCRIPTION
  1491. .°dONLNdQ¯ä›+BAfter you call the °dONLNdd¯›)S    PrGeneral°dONLNdm¯)6 prR`°dONLNdp¯<) ocedur$¿°dONLNdv¯<n) e with the $¿°dONLNdůn§)2    GetRotnOp$¿°dONLNd䯧˝)6 opcode, you should °dONLNdûäÒ(ächeck the value in the °dONLNdµÒ)giError°dONLNdª)$ fi°dONLNdæL)     eld of the °dONLNd…Lé). TGetRotnBlk°dONLNd‘éî)B rR`°dONLNd÷î¶)ecor$¿°dONLNd⁄¶)d. The possible r˜ °dONLNdÎÔ)Iesult °dONLNdÒäÆ(äcodes arR`°dONLNd˘ÆÌ)$e listed belowg`°dONLNdÏÒ)>. 9¿°dONLNd    Ò¯)YN¿°dONLNd
  1492. ˜M)ou should also call N¿°dONLNdMw)VPrErrorN¿°dONLNd%w°)*     (which r! °dONLNd.°‘)* eturns the rÛİdONLNd:”)2esult code left ˇˇÂ¥°dONLNdJä((%äby the last Printing Manager rŒ‰°dONLNdh(á)áoutine) after checking the ˇˇ±e¥°dONLNdÉà(¨)wiErrorˇˇÂ¥e¥°dONLNdâ¨(¥)$ fiKh°dONLNdåµ(Ï)    eld, to be surŒ‰°dONLNdöÏ()7
  1493. e that no .°dONLNd§(ä4Δ(1äadditional err˚ °dONLNd≤(Δ4Á)<ors wer‡°dONLNdπ(Ë4 )"e generated. °dONLNd«NHWb(UHRESULëİdONLNdÃNbWÜ)T CODES
  1494. .°dONLNd‘]äi®+(noErr.°dONLNd⁄]i)å0°dONLNd‹]/iK)No errE†°dONLNd‚]LiU)or°dONLNdÂhätæ(qä    OpNotImpl°dONLNdÔht)å2°dONLNdÒh/tÓ)+Printer driver does not support this opcode°dONLNdçHño(îHSEE ALSO
  1495. .°dONLNd&úä®ú+BSee °dONLNd*úú®Ã) Listing 1-5°dONLNd5úî⁄)0 on °dONLNd9ú⁄®˚)page 1-°dONLNd@ú˚®)!21°dONLNdBú®Ç)
  1496.  for an example of using the °dONLNd_úÇ®∏)}    GetRotnOp°dONLNdhú∏®Ê)6  opcode to .°dONLNds®ä¥Å(±ä9determine if the user has selected landscape orientation.
  1497. ‰HÏ4ÂHÏ ÂHÂ
  1498. ˇ·ˇ‚7^ °dONLNdÆ◊HÂé(·H PrGeneral W    ¿°dONLNdπ◊èÂû)G.ith the DraftBitsOp and NoDraftBitsOp Opcodes 
  1499. ʰdONLNdÁÿû‰†(·û f°dONLNdËÿ°‰£)  ʰdONLNdÈ◊£Â¶) ʰdONLNdÍ◊¶Â©) ˇˇˇˇˇˇ)j1
  1500. .°dONLNdψäØ(ˇäUse the °dONLNdÙˆØÂ)%    PrGeneral°dONLNd˝ˆÂÒ)6 prR`°dONLNdˆÒ) ocedur$¿°dONLNdˆ\)e with the value $¿°dONLNdˆ\û)N DraftBitsOp$¿°dONLNd"ˆû¡)B     for the $¿°dONLNd+ˆ¡Î)#iOpcode$¿°dONLNd2ˆÎÙ)* fi$¿°dONLNd5ˆÙ)    eld of .°dONLNd<äD( ä(the parameter block when you want to for”`°dONLNddDΔ)∫ce draft-quality printing. The .°dONLNdÉäÿ(äNoDraftBitsOp°dONLNdêÿ¥)N3 opcode cancels the use of draft-quality printing. °dONLNdƒ&ä2P(/ä!PROCEDURE PrGeneral (pData: Ptr);°dONLNdÊ>äJ®*pData°dONLNdÏ>ÃJ‘)BAÛ`°dONLNdÌ>”J ) pointer to a Û`°dONLNd˚> JM)8 TDftBitsBlkÛ`°dONLNd>MJS)B r≈¿°dONLNd>SJe)ecorò °dONLNd >eJq)d (ò °dONLNd>qJí) page 1-ò °dONLNd>íJú)!38ò °dONLNd>úJ•)
  1501. ). .°dONLNddHmÅ(kH DESCRIPTION
  1502. .°dONLNd(sä›+BAfter you call the °dONLNd;s›)S    PrGeneral°dONLNdDs)6 prR`°dONLNdGs<) ocedur$¿°dONLNdMs<n) e with the $¿°dONLNdXsn∞)2 DraftBitsOp$¿°dONLNdcs∞    )B opcode, you should °dONLNdwäãÒ(àächeck the value in the °dONLNdéÒã)giError°dONLNdîã)$ fi°dONLNdóãL)     eld of the °dONLNd¢Lãé). TDftBitsBlk°dONLNd≠éãî)B rR`°dONLNdØîã¶)ecor$¿°dONLNd≥¶ã)d. The possible r˜ °dONLNdƒÔã)Iesult °dONLNd ãäóÆ(îäcodes arR`°dONLNd“ãÆóÌ)$e listed belowg`°dONLNd‡ãÏóÒ)>. 9¿°dONLNd‚ãÒó¯)YN¿°dONLNd„ã˜óM)ou should also call N¿°dONLNd˜ãMów)VPrErrorN¿°dONLNd˛ãwó°)*     (which r! °dONLNdã°ó‘)* eturns the rÛİdONLNdã”ó)2esult code left ˇˇÂ¥°dONLNd#óä£(†äby the last Printing Manager rŒ‰°dONLNdAó£á)áoutine) after checking the ˇˇ±e¥°dONLNd\óࣨ)wiErrorˇˇÂ¥e¥°dONLNdb󨣥)$ fiKh°dONLNdeóµ£Ï)    eld, to be surŒ‰°dONLNdsóÏ£)7
  1503. e that no .°dONLNd}£äØΔ(¨äadditional err˚ °dONLNdã£ΔØÁ)<ors wer‡°dONLNdí£ËØ )"e generated. ˇÜ@ˇ ˇˇˇˇ@
  1504. ˇ·ˇ‚7^
  1505. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1506. (‡*1 )-c)54    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯°dONLNd\*eD(c*RESULëİdONLNd\Deh)T CODES,
  1507. Courier
  1508. .°dONLNdklwä+(noErr.°dONLNdk¯w˝)å0°dONLNdkw-)No errE†°dONLNdk.w7)or°dONLNdvldž(l    OpNotImpl°dONLNd(v¯Ç˝)å2°dONLNd*vÇ–)+Printer driver does not support this opcode°dONLNdVõ*§Q(¢*SEE ALSO
  1509. °dONLNd_™l∂}+BSee ”°dONLNdc™}∂G),“Choosing Draft-Quality Printing” on page 1-`°dONLNdè™H∂R)À21`°dONLNdë™R∂u)
  1510.  for morǰdONLNdô™u∂Ô)#e information on using  the .°dONLNdµ∂l¬Æ(øl DraftBitsOp°dONLNd¿∂Ƭ√)B and °dONLNd≈∂√¬)NoDraftBitsOp°dONLNd“∂¬P)N opcodes to forR`°dONLNd·∂P¬È)?&ce the use of or to cancel the use of .°dONLNd¬lŒÕ(Àldraft-quality printing.
  1511. Ú*˙¯4Û*˙¯ Û*Û˛
  1512. ˇ·ˇ‚7^ °dONLNdÂ*Û:(Ô*Err@°dONLNd"Â;Û|) or Handlingˇˇˇˇˇˇ(ÔÚ1
  1513. .°dONLNd.˙lÄ(lThe °dONLNd2˙Ä™)PrError°dONLNd9˙™÷)*  function rR`°dONLNdD˙÷    ), eturns the r$¿°dONLNdP˙    “)3.esult code left by the last Printing Manager r˜ °dONLNd~˙—Ú)»outine. °dONLNdÜlÄ(lThe °dONLNdäĺ)
  1514. PrSetError°dONLNd)< prR`°dONLNdó»Â) ocedur$¿°dONLNdùÂ|)$e lets you set the value of the curr˜ °dONLNd¡{È)ñent Printing Manager err…İdONLNdŸÈÚ)nor  °dONLNd€Ú˜)    . 
  1515. B*J¯4C*J¯ C*C˛
  1516. ˇ·ˇ‚7^ .°dONLNdfl5*CT(?*PrError ¿°dONLNdÁ5UCX)+ ˇˇˇˇˇˇ(?Ú1
  1517. °dONLNdÈTl`r(]lY@İdONLNdÍTr`∂)ou can get the r<@°dONLNd˙T∂`Ë)D esult code r‡°dONLNdTÈ`í)3&eturned by the last Printing Manager rµÄ°dONLNd,Tí`∏)©    outine frê¿°dONLNd5T∏`Ÿ)&om the .°dONLNd<`llñ(ilPrError°dONLNdC`ñl¡)*  function. °dONLNdOxlÑ(ÅlFUNCTION PrError: Integer;.°dONLNdj†*©c(ß* DESCRIPTION
  1518. °dONLNdvØlªè+B    If an errÖ°dONLNdØèªÊ)#Mor that does not belong to the Printing Manager occurs, the Printing Manager .°dONLNdêl«÷(ƒlputs it into low memoryd@°dONLNd„ª’«Ú)i, wher6†°dONLNdȪګ$)e it can be r    °dONLNdˆª$«ç)2etrieved with a call to     °dONLNdªç«∑)iPrErrorK†°dONLNdª∂«Â)) , and then .°dONLNd «l” (–l*terminates the printing loop, if necessary3 °dONLNdJ« ”ç)¥.  If you encounter an err¿°dONLNdd«ç”È)mor in the middle of a °dONLNdz”lfl(‹l&printing loop, do not end printing abrÄİdONLNd†”fln)ßuptly; call the close r{¿°dONLNd∑”nflœ)[outines for any open rÔ@°dONLNdÕ”œflÒ)aoutines °dONLNd’fllΣ(Ël you have alrz`°dONLNd·fl£Îè)73eady made and let the Printing Manager terminate prô‡°dONLNdflèδ)Ïoperly)İdONLNdfl´ÎÈ). The Printing °dONLNd)Îl˜ö(Ùl    Manager rW°dONLNd2Îö˜&). eturns the following general errH°dONLNdRÎ&˜8)åors:     °dONLNdXlÑ( lName°dONLNd^¸0)ê Result Code°dONLNdknü)r Description
  1519. .°dONLNdwlú(liPrAbort.°dONLNdŸ )ê128°dONLNdÖn√)rApplication or user°dONLNdún*q* rE°dONLNdùr*∑)equested cancel.°dONLNd≠.l:ä(7lnoErr.°dONLNd¥.¸:)ê0°dONLNd∂.n:ä)rNo errE†°dONLNdº.ã:î)or.°dONLNdø>lJ®(Gl
  1520. iPrSavPFil.°dONLNdÀ>¸J)ê–1°dONLNdŒ>nJ≠)rSaving print fi¨Ä°dONLNd›>≠J¥)?le.°dONLNd‡NlZ®(Wl
  1521. controlErr.°dONLNdÏN¸Z )ê–17°dONLNdNnZ–)rUnimplemented contr^`°dONLNdN–Zÿ)bol°dONLNd    ZnfÇ(cninstró¿°dONLNdZÇf¢)uctions.°dONLNdjlvú(sliIOAbort.°dONLNd j¸v )ê–27°dONLNd$jnvé)rI/O err ‡°dONLNd+jévó) or.°dONLNd.zlÜÆ(Él iMemFullErr.°dONLNd;z¸Ü)ê–108°dONLNd@znÜ©)r Not enough r√‡°dONLNdLz©Üÿ);
  1522. oom in the°dONLNdZÜníõ(èn    heap zone.°dONLNddñl¢Æ(ül resNotFound.°dONLNdqñ¸¢)ê–192°dONLNdvñn¢Ì)rThe printer does not support.°dONLNdñ¢nÆÄ* the °dONLNdö¢ÄÆ∂)    PrGeneral°dONLNd£¢∂Ƭ)6 prR`°dONLNd¶¢¬Æfl) ocedur$¿°dONLNd¨¢flƉ)e°dONLNdÆ¥l¿–(ΩlThe Device Manager rR`°dONLNd¬¥–¿ˇ)d eturns the R`°dONLNdÕ¥ˇ¿;)/
  1523. controlErrR`°dONLNd◊¥;¿A)< r$¿°dONLNdŸ¥A¿r) esult code. ˇ‚@ˇ ˇˇˇˇ@
  1524. ˇ·ˇ‚7^
  1525. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1526. ~¿(‡1‡)-a¿)55(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  1527. °dONLNd\ähŒ(eäThe following r∞@°dONLNd\Œh
  1528. )Desult codes arµ‡°dONLNd\
  1529. h-)<e specifim†°dONLNd&\.hr)$c to the LaserWJ¿°dONLNd5\rh«)Driter printer family:    °dONLNdKuäÄæ(}ä Result Code°dONLNdWuΔĘ)< Description
  1530. °dONLNdcÉäè£(åä–8133°dONLNdiÉΔè)<PostScript errO@°dONLNdwÉè*)<    or occurrL °dONLNdÄÉ*èfi)()ed during transmission of data to printer°dONLNd©Éfiè)¥    .  Most  °dONLNd¥èΔõ‡(òΔ>often caused by a bug in the PostScript code being downloaded.°dONLNdÛüä´£(®ä–8132°dONLNd˘üΔ´Ã)<T °dONLNd˙üô
  1531. )imeout occurṙ°dONLNdü    ´ù)=ed (no communication has occurr¡†°dONLNd&üù´)îed with the printer for °dONLNd@´Δ∑](¥Δ"2 minutes.  Usually caused by extrÛ@°dONLNdb´]∑Õ)óemely long imaging time.°dONLNd{ªä«£(ƒä–8131°dONLNdÅªΔ«¸)<Printer not rLJ°dONLNd骸«¶)6%esponding; it may have been turned of °dONLNd≥ªß«‘)´ f.  This errÌ¿°dONLNdøª”«˝),
  1532. or occurs °dONLNdÀ«Δ”(–Δif a user turns of¢‡°dONLNd›«”F)H f the LaserW+¿°dONLNdÈ«F”ı)8+riter printer in the middle of a print job.°dONLNd◊ä„£(‡ä–4101°dONLNd◊Δ„?)<Printer not found or closed.°dONLNd8ÁäÛ£(ä–4100°dONLNd>ÁΔÛ)<Connection closed.°dONLNdQ˜ä£(ä–4099°dONLNdW˜Δ–)<W¬†°dONLNdX˜œ‰)    rite rÓ†°dONLNd^˜‰$)equest too big.°dONLNdnä£(ä–4098°dONLNdtΔ˜)< Request alr@°dONLNd¯,)2 eady active.°dONLNdåä#£( ä–4097°dONLNdíΔ#)<Bad connection r∞İdONLNd¢#/)Jefnum.°dONLNd©'ä3£(0ä–4096°dONLNdØ'Δ3›)<No fr›@°dONLNd¥'›3))ee Connect ContrÅ@°dONLNdƒ'*3ù)Mol Blocks (CCBs) available.°dONLNdfl9äEî(BäIf ,
  1533. Courier°dONLNd‚9îEæ)
  1534. PrError°dONLNdÈ9æEƒ)* rR`°dONLNdÎ9ƒE·)eturns R`°dONLNdÚ9·E#) resNotFoundR`°dONLNd˝9#Ev)B after you call the R`°dONLNd9vE¨)S    PrGeneralR`°dONLNd9¨E∏)6 pr$¿°dONLNd9∏E’) ocedur˜ °dONLNd#9‘E) e, the curr…İdONLNd.9E)-ent °dONLNd2EäQ'(Nä$printer driver does not support the °dONLNdVE'Q])ù    PrGeneral°dONLNd_E]Qi)6 prR`°dONLNdbEiQÜ) ocedur$¿°dONLNdhEÜQê)e. ˜ °dONLNdkEèQñ)    Y  °dONLNdlEñQ˛)ou should clear this errfiİdONLNdÑE˝Q)gor °dONLNdáQä]‹(Zäwith a call to the °dONLNdöQ‹])R
  1535. PrSetError°dONLNd§Q]$)< prR`°dONLNdßQ$]A) ocedur$¿°dONLNd≠QA]Ê)%e, with a parameter of 0; otherwise, $¿°dONLNd“QÊ])•PrError$¿°dONLNdŸQ])* .°dONLNd⁄]äi¸(fämight still contain this errÖ`°dONLNdˆ]¸ip)ror next time you check it.  .°dONLNduäÅŸ(~äThe following errR`°dONLNd$uŸÅÚ)Oors ar$¿°dONLNd*uÚÅ)e specifi$¿°dONLNd3uÅ8)%c to the$¿°dONLNd;u8Ån)!    PrGeneral$¿°dONLNdDunÅz)6 pr˜ °dONLNdGuyÅñ) ocedur…İdONLNdMuñÅû)e:    .°dONLNdPéäô¢(ñäName°dONLNdVéôN)ê Result Code°dONLNdcéåôΩ)r Description
  1536. .°dONLNdoú䮿(•ä    NoSuchRsl.°dONLNdzú®)ê1°dONLNd|ú宿)r Requested r @°dONLNdáú¡®)5esolution is not °dONLNdú®å¥π(±å    supported.°dONLNd¶∏䃿(¡ä    OpNotImpl.°dONLNd±∏ƒ)ê2.°dONLNd≥∏僺)r
  1537. Requested °dONLNdΩ∏ºƒÚ)0    PrGeneral°dONLNdΔ∏ÚƒÙ)6 .°dONLNdÀƒå–(Õåopcode not implemented in °dONLNdÈ–å‹Æ* the curr `°dONLNdÒ–Ø‹˚)#ent printer driver2¿°dONLNd–˚‹˝)L..°dONLNd‡äÏÃ(Èä resNotfound.°dONLNd‡Ï.)ê–192°dONLNd‡åϱ)rThe currÍ¿°dONLNd‡±Ï)%ent printer driver .°dONLNd6Ïå¯÷(ıådoes not support °dONLNdGÏ÷¯ )J    PrGeneral°dONLNdPÏ ¯)6..°dONLNdR˛ä
  1538. Î(äThe most common err⁄İdONLNde˛Î
  1539. #)a or encounterχ°dONLNdq˛#
  1540. Ê)8,ed is –4101, which is generated if no LaserWÿ@°dONLNdù˛Ê
  1541. ˚)√riter °dONLNd£
  1542. ä(ä$printer is selected.  Since this err‡°dONLNd«
  1543. )è;or is so common, it is a good idea to display a dialog box °dONLNdä"ç(ärE°dONLNdé"7))equesting the user to select a printer frᆰdONLNd,7"∫)©om the Chooser when this errx‡°dONLNdH∫"˚)Éor is encounter0†°dONLNdW¸"    )Bed.°dONLNd[<HEo(CHASSEMBLfl°dONLNdb<nE–)&Y LANGUAGE INFORMAðdONLNdt<–EÂ)bTION
  1544. .°dONLNdyKäW¢(TäThe rR`°dONLNd~K¢W)outine selector for the R`°dONLNdñKW0)dPrErrorR`°dONLNdùK0Wö)* function is $BA000000.     .°dONLNd∂[äfè(cäTÄ–°dONLNd∑[èf∫)    rap macro°dONLNd¬[f=)ãSelector
  1545. .°dONLNdÀiäu¥(rä_PrGlue.°dONLNd‘iu9)ê$A8FD°dONLNd⁄èHòo(ñHSEE ALSO
  1546. °dONLNd„ûä™Õ+BSee the section ò‡°dONLNdÛûÕ™3)C“Handling Printing Err@°dONLNd    û4™w)gors” on page 1-8°dONLNdûw™Å)C288°dONLNdûÅ™§)
  1547.  for morİdONLNd"û•™ )$e information on using .°dONLNd9™ä∂¥(≥äPrError¬†°dONLNd@™≥∂∏)). ˇ@ˇ ˇˇˇˇ@
  1548. ˇ·ˇ‚7^
  1549. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1550. (‡*1 )-c)56    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯
  1551. j*q¯4j*q¯ j*j˛
  1552. ˇ·ˇ‚7^ °dONLNd\*ji(f* PrSetError  “İdONLNd \ijl)? ˇˇˇˇˇˇ(fÚ1
  1553. .°dONLNd{lás(ÑlYï°dONLNd{rá±)ou can use the ,
  1554. Courierï°dONLNd{±áÌ)?
  1555. PrSetErrorï°dONLNd({Ìá˘)< prg`°dONLNd+{˘á) ocedur9¿°dONLNd1{áì)e to set the value of the curr  °dONLNdO{ìáŒ)}ent printing rfiİdONLNd]{ÕáÂ):esult .°dONLNdcálìÉ(êlcode..°dONLNdiül´D*$PROCEDURE PrSetError(iErr: Integer);.°dONLNdé∑l√|*iErr°dONLNdì∑Æ√˚)BThe value of the r‡°dONLNd•∑¸√+)N esult code.°dONLNd±›*Êc(‰* DESCRIPTION
  1556. .°dONLNdΩÏl¯®+B
  1557. PrSetError°dONLNd«Ï®¯ª)< storR`°dONLNdÃϪ¯Û)es the specif"‡°dONLNdŸÏÛ¯è)8#ied value into the global variable "‡°dONLNd¸Ïè¯ø)úPrintErr"‡°dONLNdÏø¯Ÿ)0 wherı@°dONLNd    Ïÿ¯Ò)e the °dONLNd¯lÎ(lPrinting Manager keeps its rR`°dONLNd+¯Î) esult code. $¿°dONLNd7¯#)1Y9¿°dONLNd8¯"O) ou can use 9¿°dONLNdC¯Oã)-
  1558. PrSetError9¿°dONLNdM¯ãÂ)< to cancel a printing .°dONLNdclô(l
  1559. operation..°dONLNdnl(z*-If PrError <> noErr THEN PrSetError(iPrAbort).°dONLNdúD*MQ(K*ASSEMBLfl°dONLNd£DPM≤)&Y LANGUAGE INFORMAðdONLNdµD≤M«)bTION
  1560. .°dONLNd∫Sl_Ñ(\lThe rR`°dONLNdøSÑ_Ë)outine selector for the R`°dONLNd◊SË_$)d
  1561. PrSetErrorR`°dONLNd·S$_ã)< function is $C0000200.     .°dONLNd˙clnq(klTÄ–°dONLNd˚cqnú)    rap macro°dONLNdc¸n)ãTÄ–°dONLNdcn)rap
  1562. .°dONLNd ql}ñ(zl_PrGlue.°dONLNdq¸})ê$A8FD
  1563. °*©¯4¢*©¯ ¢*¢˛
  1564. ˇ·ˇ‚7^ °dONLNdî*¢î(û*Low-Level Routinesˇˇˇˇˇˇ(ûÚ1
  1565. °dONLNd-©lµ&(≤l+In general, you should use the high-level rB°dONLNdX©'µÀ)ª%outines of the Printing Manager in prº@°dONLNd}©Àµ€)§eferh`°dONLNdÅ©‹µÚ)ence °dONLNdܵl¡∑(ælto the low-level rm@°dONLNdòµ∑¡*)Koutines. Low-level calls arv°dONLNd≥µ*¡Ω)s!e not guaranteed to work in futur=‡°dONLNd‘µæ¡¯)îe versions of °dONLNd‚¡lÕø( lthe system softwar´@°dONLNdÙ¡øÕ€)Se in prı¿°dONLNd˚¡€ÕÊ)=ecisely the same manner as they have in past versions of the °dONLNd8ÕlŸç(÷lsoftwar‰¿°dONLNd?Õ矅)!e. Low-level r9¿°dONLNdMÕ Ÿı)=
  1566. outines ar˛ °dONLNdWÕıŸ¬)+1e primarily suited for functions such as text str•°dONLNdàÕ√ŸÊ)Œeaming °dONLNdèŸlÂâ(‚l(the pr¯`°dONLNdñŸâ±)
  1567. ocess of r∞ °dONLNd†Ÿ≤ˆ))eceiving data fr °dONLNd∞Ÿ˜Â")E    om a sour @°dONLNdπŸ"®)+ce and printing it immediately†°dONLNd◊Ÿ®ÂÂ)Ü, without any °dONLNdÂÂlÒÇ(ÓlAintermediate formatting). In addition, if you use the low-level r‰ °dONLNd&ÂÇÒfi(ÓÇoutines and the user °dONLNd;Òl˝ˆ(˙lprints a document on a LaserWÜ`°dONLNdXÒˆ˝*)äriter printerœ¿°dONLNdeÒ)˝`)3 , the LaserWÑ¿°dONLNdqÒ`˝Ó)7$riter printer driver translates all °dONLNdï˝l    ˜(l[low-level calls to the matching high-level ones, so your application does not gain a speed °dONLNd    lü* advantage. 
  1568. "*/¯4#*.¯,Zapf Dingbats°dONLNdˇˇ()Xs°dONLNdˇˇ+WúİdONLNdˇˇ)ARNING
  1569. ˇ·ˇ‚7^
  1570. °dONLNd¸,l8r(5lY@İdONLNd˝,r8\)5ou should not use both the high-level and low-level rè°dONLNd2,\8ö)Íoutines at the °dONLNdA8lDê(AlCsame time (that is, when one or the other interface has opened the °dONLNdÑDlPé* Dprinter driver). The only exception to this is that you may use the .°dONLNd»Pl\®*
  1571. PrDrvrVers°dONLNd“P®\‘)<  function (°dONLNd›P‘\ı),page 1-°dONLNd‰Pı\ˇ)!58°dONLNdÊPˇ\i)
  1572. ) with the high-level rR`°dONLNd˝Pi\å)joutines..R`°dONLNdˇˇ)&s
  1573. ç*ï¯4ç*ç*ç˛
  1574. ˇ·ˇ‚7^ °dONLNd*çt(â* PrDrvrOpen  &°dONLNd'uçx)K ˇˇˇˇˇˇ(âÚ1
  1575. .°dONLNd)ûl™Ä(ßlThe °dONLNd-ûÄ™º)
  1576. PrDrvrOpen°dONLNd7ûº™»)< prR`°dONLNd:û»™Â) ocedur$¿°dONLNd@û™X)e opens the printer driverg`°dONLNdZûW™`)r, r9¿°dONLNd]û`™œ)    eading it into memory if .°dONLNdv™l∂ñ(≥l    necessary4‡°dONLNd™ñ∂†)*.   ˇ“@ˇ ˇˇˇˇ@
  1577. ˇ·ˇ‚7^
  1578. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1579. ~¿(‡1‡)-a¿)57(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿,
  1580. Courier
  1581. .°dONLNd\äh(eäPROCEDURE PrDrvrOpen;.°dONLNdÑHçÅ(ãH DESCRIPTION
  1582. .°dONLNd"ìäüØ+BUse the °dONLNd*ìØüÎ)%
  1583. PrDrvrOpen°dONLNd4ìÎü˜)< prR`°dONLNd7ì˜ü) ocedur$¿°dONLNd=ìüF) e with the $¿°dONLNdHìFüà)2 PrDrvrClose$¿°dONLNdSìàüî)B pr˜ °dONLNdVììü∞) ocedur…İdONLNd\ì∞ü˛)e. Do not mix the .°dONLNdnüä´“(®äopen and close rôİdONLNd~ü“´î)H.outines for the low-level interface with the rć°dONLNd¨üî´æ)¬
  1584. outines frô °dONLNd∂üæ´)*om the high-level °dONLNd»´ä∑µ(¥ä interface. °dONLNd‘—H⁄o(ÿHASSEMBLfl°dONLNd€—n⁄–)&Y LANGUAGE INFORMAðdONLNdÌ—–⁄Â)bTION
  1585. .°dONLNdÚ‡äÏ¢(ÈäThe rR`°dONLNd˜‡¢Ï)outine selector for the R`°dONLNd‡ÏB)d
  1586. PrDrvrOpenR`°dONLNd‡BÏN)< pr$¿°dONLNd‡NÏk) ocedur˜ °dONLNd"‡jÏÆ)e is $80000000.     .°dONLNd3ä˚è(¯äTÄ–°dONLNd4è˚∫)    rap macro°dONLNd?˚)ãTÄ–°dONLNd@˚-)rap
  1587. .°dONLNdD˛ä
  1588. ¥(ä_PrGlue.°dONLNdM˛
  1589. 9)ê$A8FD
  1590. :HB4;HB ;H;
  1591. ˇ·ˇ‚7^ °dONLNdT-H;í(7HPrDrvrClose  &°dONLNda-ì;ñ)K ˇˇˇˇˇˇ(71
  1592. ˇˇ≈⁄.°dONLNdcLäXù(UäThe ˇˇQéE⁄°dONLNdgLûX‡) PrDrvrCloseˇˇ≈⁄E⁄°dONLNdrL‡XÎ)B prfi°dONLNduLÎX) ocedur∞t°dONLNd{LX{)e closes the printer driver
  1593. |°dONLNdñL{XÉ)s, r¢∂°dONLNdôLÉX)!eleasing the memory it occupies. °dONLNdªdäp(mäPROCEDURE PrDrvrClose;.°dONLNd“åHïo(ìHASSEMBLfl°dONLNdŸånï–)&Y LANGUAGE INFORMAðdONLNdÎå–ïÂ)bTION
  1594. .°dONLNdõäߢ(§äThe rR`°dONLNdıõ¢ß)outine selector for the R`°dONLNdõßH)d PrDrvrCloseR`°dONLNdõHßT)B pr$¿°dONLNdõTßq) ocedur˜ °dONLNd!õpߥ)e is $88000000.     .°dONLNd2´ä∂è(≥äTÄ–°dONLNd3´è∂∫)    rap macro°dONLNd>´∂)ãTÄ–°dONLNd?´∂-)rap
  1595. .°dONLNdCπä≈¥(¬ä_PrGlue.°dONLNdLπ≈9)ê$A8FD
  1596. ıH˝4ˆH˝ ˆHˆ
  1597. ˇ·ˇ‚7^ °dONLNdSËHˆç(ÚH PrDrvrDCE  {@°dONLNd^Ëéˆë)F ˇˇˇˇˇˇ(Ú1
  1598. .°dONLNd`ä¿(ä    PrDrvrDCE°dONLNdi¿Δ)6 rR`°dONLNdkΔj)%eturns a handle to the printer driver¿°dONLNdêk™)•’s device contr‚ °dONLNdü©)>ol entry (DCE). °dONLNd∞ä+,((äFUNCTION PrDrvrDCE: Handle;.°dONLNdÃGHPÅ(NH DESCRIPTION
  1599. °dONLNdÿVäbŸ+BThe printer driverˇÄ°dONLNdÍV⁄b)P’s device contrp °dONLNd˘VbÇ)@ol entry contains specifi İdONLNdVÉb)i!c information about that printer °dONLNd3bän•(kädriver‡°dONLNd9b•n™). Ó@°dONLNd;b©nØ)YÆ¿°dONLNd<bØnR)&ou can also get a handle to the driverø`°dONLNdbbSn¸)§%’s DCE by calling the Device Manager .°dONLNdánäz∞(wä    function °dONLNdên∞z¯)& GetDCtlEntryd@°dONLNdún˜z)G    . For mor6†°dONLNd•nzÆ)' e information about device contr    °dONLNd≈nÆz)êol entries and how .°dONLNdÿzäÜÀ(ÉäFthe Device Manager uses them, see the chapter “Device Manager” in the #`°dONLNdzÃÜÊ(ÉÃInside °dONLNd%Üäí¥(èä    MacintoshpİdONLNd.ܵí∫)+: pİdONLNd:Ü∫íŸ)Devicesª¿°dONLNdAÜŸífi). ˇ@ˇ ˇˇˇˇ@
  1600. ˇ·ˇ‚7^
  1601. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1602. (‡*1 )-c)58    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯°dONLNd\*eQ(c*ASSEMBLfl°dONLNd\Pe≤)&Y LANGUAGE INFORMAðdONLNd\≤e«)bTION
  1603. .°dONLNdklwÑ(tlThe rR`°dONLNd#kÑwË)outine selector for the ,
  1604. CourierR`°dONLNd;kËw)d    PrDrvrDCER`°dONLNdDkwÉ)6 function is $94000000.     .°dONLNd]{lÜq(ÉlTÄ–°dONLNd^{qÜú)    rap macro°dONLNdi{¸Ü)ãTÄ–°dONLNdj{Ü)rap
  1605. .°dONLNdnâlïñ(íl_PrGlue.°dONLNdwâ¸ï)ê$A8FD
  1606. ≈*Õ¯4Δ*Õ¯ Δ*Δ˛
  1607. ˇ·ˇ‚7^ °dONLNd~∏*ΔY(¬*PrDrvrV¿°dONLNdÖ∏XΔm).ers  ~°dONLNdä∏nΔq) ˇˇˇˇˇˇ(¬Ú1
  1608. ˇˇí.°dONLNdå◊l„®(‡l
  1609. PrDrvrVersˇˇ´Ü°dONLNdñ◊®„≠)< r˝Ê°dONLNdò◊≠„Ω)?eturns the version number of the printer driver in the system r/°dONLNd◊◊æ„’(‡æesourh°dONLNd‹◊’„„)ce f}n°dONLNd‡◊„„¯)ile.   °dONLNdËÔl˚(¯lFUNCTION PrDrvrVers: Integer;.°dONLNd* c(* DESCRIPTION
  1610. °dONLNd&l2|+B?The version number of the printer driver is available as the prflİdONLNdQ&|2ë(/|edefiõ@°dONLNdV&í2Õ)ned constant .°dONLNdc2l>®(;l
  1611. iPrRelease°dONLNdm2®>≠)<. R`°dONLNdo2≠>¥)Yg`°dONLNdp2≥>)ou may want to compar9¿°dONLNdÖ2>7)ge the r  °dONLNdå27>Z)    esult of   °dONLNdï2Z>ñ)#
  1612. PrDrvrVers  °dONLNdü2ñ>±)< with   °dONLNd•2±>Ì)
  1613. iPrRelease  °dONLNdØ2Ì>Ô)< .°dONLNd∞>lJˇ(Gl%to see if the printer driver in the rÑ@°dONLNd’>ˇJ)ìesourÃİdONLNd⁄>J()ce fiì °dONLNdfl>)Ji)le is the most r’¿°dONLNdÔ>iJ)@!ecent version.  This is the only °dONLNdJlV((Sl+low-level printing function you may call fr£¿°dONLNd;J(V£)ºom the high-level interface. °dONLNdYp*yQ(w*ASSEMBLfl°dONLNd`pPy≤)&Y LANGUAGE INFORMAðdONLNdrp≤y«)bTION
  1614. .°dONLNdwlãÑ(àlThe rR`°dONLNd|ÑãË)outine selector for the R`°dONLNdîËã$)d
  1615. PrDrvrVersR`°dONLNdû$ãå)< function is $9A000000.     .°dONLNd∑èlöq(ólTÄ–°dONLNd∏èqöú)    rap macro°dONLNd√è¸ö)ãTÄ–°dONLNdƒèö)rap
  1616. .°dONLNd»ùl©ñ(¶l_PrGlue.°dONLNd—ù¸©)ê$A8FD
  1617. Õ*’¯4Œ*’¯ Œ*Œ˛
  1618. ˇ·ˇ‚7^ °dONLNd◊¿*ŒÑ( *Low-Level ContrÚ°dONLNdʿь´)Zol Callsˇˇˇˇˇˇ( Ú1
  1619. .°dONLNdÔ’l·Ä(filThe °dONLNdÛ’Ä·∂)    PrCtlCall°dONLNd¸’∂·¬)6 prR`°dONLNdˇ’¬·fl) ocedur$¿°dONLNd’fl·O)e calls the printer driver‚ °dONLNd’O·n)p’s contr¥Ä°dONLNd'’n·})ol r܇°dONLNd+’}·Ò)outine. Instead of sending ˇˇ∏ú°dONLNdF·lÌ(Íl(the low-level calls to the device driverH°dONLNdn·Ì3)±, the ˇˇ)‘áİdONLNdt·3Ìi)    PrCtlCallˇˇ∏úáİdONLNd}·iÌt)6 pr|°dONLNdÄ·uÌí) ocedur‰‹°dONLNdÜ·ë̘)e converts the call into .°dONLNdüÌl˘(ˆlits high-level equivalent befor~°dONLNdæÌ˘&)Ñe execution. °dONLNdÃ*Q(*ASSEMBLfl°dONLNd”P≤)&Y LANGUAGE INFORMAðdONLNdÂ≤«)bTION
  1620. .°dONLNdÍ"l.Ñ(+lThe rR`°dONLNdÔ"Ñ.Ë)outine selector for the R`°dONLNd"Ë.)d    PrCtlCallR`°dONLNd".*)6 pr$¿°dONLNd"*.G) ocedur˜ °dONLNd"F.é)e is $A0000E00.     .°dONLNd*2l=q(:lTÄ–°dONLNd+2q=ú)    rap macro°dONLNd62¸=)ãTÄ–°dONLNd72=)rap
  1621. .°dONLNd;@lLñ(Il_PrGlue.°dONLNdD@¸L)ê$A8FD
  1622. |*ѯ4}*ѯ }*}˛
  1623. ˇ·ˇ‚7^ °dONLNdKo*}l(y* PrCtlCall WZİdONLNdVol}/)B%ith the iPrBitsCtl Control Constant  >İdONLNd{o0}3)ƒ ˇˇˇˇˇˇ)¬1
  1624. .°dONLNd}élös(ólYï°dONLNd~érö±)ou can use the ï°dONLNdçé±öÁ)?    PrCtlCallï°dONLNdñéÁöÛ)6 prg`°dONLNdôéÛö) ocedur9¿°dONLNdüéöB) e with the 9¿°dONLNd™éBö~)2
  1625. iPrBitsCtl9¿°dONLNd¥é~öñ)< contr  °dONLNd∫éñö„)ol constant when .°dONLNdÀöl¶‰(£lyou want to print bitmaps. ˇ@@ˇ ˇˇˇˇ@
  1626. ˇ·ˇ‚7^
  1627. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡ä    Reference
  1628. ~¿(‡1‡)-a¿)59(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿,
  1629. Courier
  1630. .°dONLNd\ähÏ(eä;PROCEDURE PrCtlCall (iWhichCtl: Integer; lParam1: LongInt; °dONLNdFjv‡+~$lParam2: LongInt; lParam3: LongInt);.°dONLNdkÇäé∑(ãä    iWhichCtl°dONLNduÇÃé)BThe constant ܰdONLNdÇÇé1);
  1631. iPrBitsCtl/‡°dONLNdåÇ2é
  1632. )+4. This constant allows you to send all or part of a °dONLNd¿éÃö1(óÃQuickDraw bitmap dir£@°dONLNd‘é1öÇ)eectly to the printerú°dONLNdËéÇöÑ)Q.°dONLNdÍû䙯(ßälParam1°dONLNdÚûÙ”)BA∫†°dONLNdÛû”™l)! pointer to the QuickDraw bitmap.°dONLNdÆä∫Æ(∑älParam2°dONLNdÆÃ∫”)BA∫†°dONLNdÆ”∫) pointer to the rD‡°dONLNd/Æ∫è)Eectangle you want to print.°dONLNdKæä Æ(«älParam3°dONLNdSæÃ )BThe type of rÁ`°dONLNd`æ ‘)8.esolution used to print the bitmap. The LaserW °dONLNdéæ’  )—riter printer °dONLNdú Ã÷(”à driver ignor‹†°dONLNd® ÷%)5    es this fl) °dONLNd≤ &÷)%1ag. This parameter can have one of the following °dONLNd„÷ÂÎ(flÃvalues:    °dONLNdÎÔä˙∞(˜äConstant°dONLNdıÔ˙ )êV0°dONLNdˆÔ ˙2)alue°dONLNd˚Ôå˙Ω)l Description
  1633. .°dONLNd˝ä    Ã(ä lScreenBits.°dONLNd˝    G)ê    $00000000°dONLNd˝å    £)rThe rÄ¿°dONLNd#˝£    ‚)esolution is 80,    SymbolÉ`°dONLNd2˝‚È)? ¥Ä`°dONLNd4˝Í    ˘) 72..°dONLNd9    äΔ(ä
  1634. lPaintBits.°dONLNdE    G)ê    $00000001°dONLNdO    å£)rThe rÄ¿°dONLNdT    £‚)esolution is 72É`°dONLNdc    ‚È)? ¥Ä`°dONLNde    Í˘) 72..°dONLNdjä!ÿ(älHiScreenBits.°dONLNdy!G)ê    $00000002°dONLNdÉå!£)rThe rÄ¿°dONLNdà£!Á)esolution is 160É`°dONLNdòÁ Ó)D ¥Ä`°dONLNdöÔ!) 144..°dONLNd†!ä-“(*ä lHiPaintBits.°dONLNdÆ!-G)ê    $00000003°dONLNd∏!å-£)rThe rÄ¿°dONLNdΩ!£-Á)esolution is 144É`°dONLNdÕ!Á,Ó)D ¥Ä`°dONLNdœ!Ô-) 144.
  1635. ]He4^He ^H^
  1636. ˇ·ˇ‚7^ °dONLNd÷PH^ä(ZH PrCtlCall WZİdONLNd·Pä^G)B#ith the iPrIOCtl Control Constant  ñİdONLNdPG^J)Ω ˇˇˇˇˇˇ)…1
  1637. .°dONLNdoä{ë(xäYï°dONLNdoê{œ)ou can use the ï°dONLNdoœ{)?    PrCtlCallï°dONLNdo{)6 prg`°dONLNd"o{.) ocedur9¿°dONLNd(o.{`) e with the 9¿°dONLNd3o`{ê)2iPrIOCtl9¿°dONLNd;oê{®)0 contr  °dONLNdAo®{)ol constant when you .°dONLNdV{äá¡(Ñäwant text str¶ °dONLNdc{¡áC)7eaming in your application. T±`°dONLNdÄ{Cá^)Çext str™`°dONLNdá{^á)+eaming is useful for fast printing of text °dONLNd≤áäì›(êäwhen speed is morÂ`°dONLNd√á›ìL)Se important than visual fiÿ¿°dONLNd›áMì˚)p)delity or formatting. It makes no use of °dONLNdìäüΩ(úä    QuickDrawf†°dONLNdìΩü¬)3. .°dONLNd´ä∑Ï(¥ä;PROCEDURE PrCtlCall (iWhichCtl: Integer; lParam1: LongInt; °dONLNdXπ≈‡+~$lParam2: LongInt; lParam3: LongInt);.°dONLNd}—ä›∑(⁄ä    iWhichCtl°dONLNdá—Û)BThe constant ܰdONLNdî—›,);iPrIOCtlÊ¿°dONLNdú—,›¨)%. This constant causes text str懰dONLNdª—¨›Ú)Äeaming to occurÔ†°dONLNd —Ú›˘)F.  .°dONLNdŒ·äÌ¥(ÍälParam1.°dONLNd÷·ÃÌ”)BA∫†°dONLNd◊·”Ìt)' pointer to the beginning of the text. °dONLNdˇÒä˝Æ(˙älParam2°dONLNdÒÃ˝W)BThe number of bytes to transfer#@°dONLNd&ÒW˝ê)ã. The high-or†°dONLNd3Òê˝≥)9der worÒ °dONLNd:Ò≤˝Í)"d must be 0. °dONLNdHäÆ(
  1638. älParam3°dONLNdPÃ)BThis should be 0. 
  1639. =HE4>HE >H>
  1640. ˇ·ˇ‚7^ °dONLNdd0H>ä(:H PrCtlCall WZİdONLNdo0ä>G)B#ith the iPrEvtCtl Control Constant ϰdONLNdí0G>J)Ω ˇˇˇˇˇˇ)…1
  1641. .°dONLNdîOä[ë(XäYï°dONLNdïOê[œ)ou can use the ï°dONLNd§Oœ[)?    PrCtlCallï°dONLNd≠O[)6 prg`°dONLNd∞O[.) ocedur9¿°dONLNd∂O.[`) e with the 9¿°dONLNd¡O`[ñ)2    iPrEvtCtl9¿°dONLNd Oñ[Æ)6 contr  °dONLNd–OÆ[Ô)ol constant for .°dONLNd‡[ägÕ(däprinting the scr    `°dONLNd[Œgã)D&een or the topmost window on an ImageWïİdONLNd[ägæ)ºriter printerfi‡°dONLNd#[Ωg˜)3 . The LaserWr@°dONLNd/[˜g ):riter °dONLNd5gäs=(pä+printer driver does not support this call. .°dONLNdaäãÏ*;PROCEDURE PrCtlCall (iWhichCtl: Integer; lParam1: LongInt; °dONLNdßçô‡+~$lParam2: LongInt; lParam3: LongInt);.°dONLNdÕä±∑(Æä    iWhichCtl°dONLNd÷•ñ)BThe constant ܰdONLNd„•±0);    iPrEvtCtl∞¿°dONLNdÏ•0± ))4. This constant prints the object you have selected °dONLNd ±ÃΩ˜(∫Ã
  1642. using the Í`°dONLNd*±˜Ω)+lParam1£°dONLNd1±ΩL)%
  1643.  parameterˆ†°dONLNd;±KΩR)/.  ˇä@ˇ ˇˇˇˇ@
  1644. ˇ·ˇ‚7^
  1645. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1646. (‡*1 )-c)60    )9    Reference*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  1647. Courier
  1648. .°dONLNd\lhñ(ellParam1.°dONLNd\ÆhÔ)BMThis parameter selects the object to be printed. If this value is $00000000, °dONLNdUhÆt* you want to print the scrn‡°dONLNdnhtÒ)m3een. If this value is $00010000, you want to print °dONLNd°tÆÄ
  1649. (}Æthe topmost windowÓ@°dONLNd≥t    Ä)[. °dONLNd∂Ñlêê(çllParam2°dONLNdæÑÆêÒ)BThis should be ˜‡°dONLNdÕÑÒê)CNIL¡°dONLNd–Ñê). °dONLNd”îl†ê(ùllParam3°dONLNd€îƆÒ)BThis should be ˜‡°dONLNdÍîÒ†)CNIL¡°dONLNdÌî†). 
  1650. –*ÿ¯4—*ÿ¯ —*—˛
  1651. ˇ·ˇ‚7^ °dONLNdÒ√*—,(Õ*.PrCtlCall with the iPrDevCtl Control Constant °dONLNd√-—0(Õ- ˇˇˇˇˇˇ)≈1
  1652. .°dONLNd!‚lÓs(ÎlYï°dONLNd"‚rÓ±)ou can use the ï°dONLNd1‚±ÓÁ)?    PrCtlCallï°dONLNd:‚ÁÓÛ)6 prg`°dONLNd=‚ÛÓ) ocedur9¿°dONLNdC‚ÓB) e with the 9¿°dONLNdN‚BÓx)2    iPrDevCtl9¿°dONLNdW‚xÓê)6 contr  °dONLNd]‚êÓ—)ol constant for .°dONLNdmÓl˙Ç(˜lcontr>İdONLNdrÓÉ˙Ô)olling the printer device..°dONLNdçlÚ(lAPROCEDURE PrCtlCall(iWhichCtl: Integer;lParam1: LongInt;lParam2: °dONLNdŒl *LongInt; lParam3: LongInt);.°dONLNdÍ,l8ô*    iWhichCtl°dONLNdÙ,Æ8È)BThe constant ܰdONLNd,È8);    iPrDevCtlŸÄ°dONLNd
  1653. ,8),. .°dONLNd<lHñ(EllParam1.°dONLNd<ÆH‰)BGThe action you want to take.  The values possible for this parameter arû°dONLNd\<‰HÎ(E‰e °dONLNd^HÆT„(QÆ listed belowP†°dONLNdjH„TË)5. °dONLNdmXldê(allParam2°dONLNduXÆdÒ)BThis should be ˜‡°dONLNdÑXÒd)CNIL¡°dONLNdáXd). °dONLNdähltê(qllParam3°dONLNdíhÆtÒ)BThis should be ˜‡°dONLNd°hÒt)CNIL¡°dONLNd§ht). °dONLNdßé*óc(ï* DESCRIPTION
  1654. .°dONLNd≥ùl©s+BYï°dONLNd¥ùr©3),ou can specify the following values for the ï°dONLNd‡ù3©])¡lParam1ï°dONLNdÁù]©í)*  parameter:    .°dONLNdÛ∞*ªP(∏*Constant°dONLNd¸∞éªî)dV0°dONLNd˝∞)alue°dONLNd∞–ª)< Description
  1655. .°dONLNdæ* f(«*
  1656. lPrDocOpen.°dONLNdæl ô)B    $00010000°dONLNd#æ– À)d:Opens the document.This is similar to the high-level call .°dONLNd`…–’*     PrOpenDoc°dONLNdi…’≥)6' and should be followed with a call to °dONLNdê…≥’È)≠    PrCtlCall°dONLNdô…È’Î)6 °dONLNdù‘–‡˚(›–    with the °dONLNd¶‘˚‡1)+    iPrDevCtl°dONLNdØ‘1‡I)6 contrR`°dONLNdµ‘I‡É)ol call and a R`°dONLNd√‘ɇß):param1R`°dONLNd…‘߇–)$
  1657.  value of °dONLNd÷fl–Î(Ë– lPrDocClose°dONLNd·flÎ)B. °dONLNd‰Í*ˆZ(Û*lPrReset.°dONLNdÌÍlˆô)B    $00010000°dONLNd˜Í–ˆ    )d Reserved by 4‡°dONLNdÍ    ˆ&)9Apple..°dONLNd
  1658. ı*r(˛* lPrPageClose.°dONLNdırü)H    $00020000°dONLNd!ı–∂)^8Closes the page. This is similar to the high-level call .°dONLNd\– * PrClosePage°dONLNdg è)B and should follow a call to °dONLNdÑè ≈)}    PrCtlCall°dONLNdç≈ «)6 °dONLNdë –˚(–    with the °dONLNdö ˚1)+    iPrDevCtl°dONLNd£ 1I)6 contrR`°dONLNd© IÉ)ol call and a R`°dONLNd∑ Éß):param1R`°dONLNdΩ ß–)$
  1659.  value of °dONLNd –"(– lPrPageOpen°dONLNd’")B. °dONLNdÿ!*-f(**
  1660. lPrPageEnd.°dONLNd„!l-ô)B    $00020000°dONLNdÌ!–-    )d Reserved by 4‡°dONLNd˘!    -))9Apple. .°dONLNd,*8l(5* lPrLineFeed.°dONLNd,l8ô)B    $00030000°dONLNd,–8)dPaper advance.  .°dONLNd(7*CZ(@*lPrLFStd.°dONLNd17lCõ)B    $0003FFFF°dONLNd;7–C¸)d
  1661. Carriage r`°dONLNdE7˝Cë)- eturn with line feed. The ImageW$‡°dONLNde7ëCÂ)îriter printer driver °dONLNd}B–N (K–causes a carriage r†°dONLNdêB!N·)Q-eturn plus a paper feed of 1/6th of an inch. °dONLNd¿M–Y(V–
  1662. The LaserW`°dONLNd MYfi)51riter printer driver moves the pen location down °dONLNd˛X–d˙(a–
  1663. the page. .°dONLNd    c*ol(l* lPrPageOpen.°dONLNdcloô)B    $00040000°dONLNdc–oÏ)dDOpens the page for printing. This is similar to the high-level call .°dONLNdfn–z *
  1664. PrOpenPage°dONLNdpn zπ)<' and should be followed with a call to °dONLNdónπzÔ)≠    PrCtlCall°dONLNd†nÔzÒ)6 °dONLNd§y–Ö˚(Ç–    with the °dONLNd≠y˚Ö1)+    iPrDevCtl°dONLNd∂y1ÖI)6 contrR`°dONLNdºyIÖÉ)ol call and a R`°dONLNd yÉÖß):param1R`°dONLNd–yßÖ–)$
  1665.  value of °dONLNd›Ñ–ê(ç– lPrPageClose°dONLNdÈÑê)H. °dONLNdÏè*õl(ò* lPrDocClose.°dONLNd¯èlõô)B    $00050000°dONLNdè–õŒ)d<Closes the document. This is similar to the high-level call .°dONLNdAö–¶ *
  1666. PrCloseDoc°dONLNdKö ¶â)< and should follow a call to °dONLNdhöâ¶ø)}    PrCtlCall°dONLNdqöø¶Ï)6
  1667.  with the °dONLNd~•–±(Æ–    iPrDevCtl°dONLNdᕱ)6 contrR`°dONLNd畱X)ol call and a R`°dONLNdõ•X±|):param1R`°dONLNd°•|±•)$
  1668.  value of R`°dONLNd´••±·))
  1669. lPrDocOpenR`°dONLNdµ•·±Ê)<. ˇ h@ˇ ˇˇˇˇ@
  1670. ˇ·ˇ‚7^
  1671. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äSummary
  1672. ~¿(‡1‡)-a¿)61(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿
  1673. ^Hx4^Hx
  1674. äHë4äHë äHä
  1675. ˇ·ˇ‚7^ˇˇ£‰ˇÆ°dONLNdvHàí(ÑHSummaryˇˇˇˇˇˇ⁄|(Ñ 1
  1676. ¡HΔ4¡HΔ ¬H¬
  1677. ˇ·ˇ‚7^ °dONLNd≥H¡}(ΩH    Constants,
  1678. Courier
  1679. .°dONLNdÃHÿf*CONST°dONLNd⁄TÊ¥+ iPFMaxPgs = 128;°dONLNd+ËTÙ∫*iPrPgFract = 120;°dONLNd>Ë∫Ù¿)f °dONLNdBˆfÏ(ˇfA{Page scale factor. ptPgSize (below) is in units of 1/iPrPgFract}°dONLNdÖT¢(TiPrPgFst = 1;°dONLNd)N °dONLNdõ‰h)B{Page range constants}°dONLNd≥T¥(TiPrPgMax = 9999;°dONLNd≈ T,Æ*iPrRelease = 3;°dONLNd◊ Æ,¥)Z °dONLNd› ‰,¬)6%{Current version number of the code.}°dONLNd.T:¥(7TiPrSavPFil = -1;°dONLNd<TH∫*iPrAbort = $0080;°dONLNd)JTV®*iPrDevCtl = 7;°dONLNd:J®VÆ)T °dONLNd@J‰V§)< {The PrDevCtl proc's ctl number}°dONLNdbXTd“(aTlPrReset = $00010000;°dONLNdX‰d»)ê&{The PrDevCtl proc's CParam for reset}°dONLNdßfTr‰(oTlPrLineFeed = $00030000;°dONLNd¡tTÄ“*lPrLFStd = $0003FFFF;°dONLNdfit‰Ä)ê2{The PrDevCtl proc's CParam for std paper advance}°dONLNdÇTéfi(ãTlPrLFSixth = $0003FFFF;°dONLNd+êTúfi*lPrPageEnd = $00020000;°dONLNdJê‰ú⁄)ê){The PrDevCtl proc's CParam for end page}°dONLNduûT™fi(ßTlPrDocOpen = $00010000;°dONLNdé¨T∏‰*lPrPageOpen = $00040000;°dONLNd®∫TΔÍ*lPrPageClose = $00020000;°dONLNd√»T‘‰*lPrDocClose = $00050000;°dONLNd›÷T‚¢*iFMgrCtl = 8;°dONLNdÌ÷¢‚®)N °dONLNdÛ÷‰‚Ï)B,{The File Mgr's tail-hook Proc's ctl number}°dONLNd!‰TΔ(ÌTiMemFullErr = -108;°dONLNd6ÚT˛Æ*iIOAbort = -27;°dONLNdGT fi*pPrGlobals = $00000944;°dONLNdf‰ å)ê{The PrVars low memory area}°dONLNdÑTÆ(TbDraftLoop = 0;°dONLNdïT(Æ*bSpoolLoop = 1;°dONLNd¶*T6Æ*bUser1Loop = 2;°dONLNd∑8TDÆ*bUser2Loop = 3;°dONLNd»FTRÆ*iPrBitsCtl = 4;°dONLNdŸTT`¥*lScreenBits = 0;°dONLNdÎbTnÆ*lPaintBits = 1;°dONLNd¸pT|*lHiScreenBits = $00000002;°dONLNdpˆ|)¢-{The Bitmap Print proc's Screen Bitmap param}°dONLNdN~Tä(áTlHiPaintBits = $00000003; °dONLNdq~ˆä
  1680. )¢.{The Bitmap Print proc's Paint [sq pix] param}°dONLNd°åTò¢(ïTiPrIOCtl = 5;°dONLNd∞öT¶®*iPrEvtCtl = 6;°dONLNd«öˆ¶∞)¢{The PrEvent proc's ctl number}°dONLNdË®T¥fi(±TlPrEvtAll = $0002FFFD; ˇ    ‡@ˇ ˇˇˇˇ@
  1681. ˇ·ˇ‚7^
  1682. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1683. (‡*1 )-c)62    )9Summary*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  1684. Courier
  1685. .°dONLNd\Hhn(eH1{The PrEvent Proc's CParam for the entire screen}°dONLNd3j6v¿(s6lPrEvtTop = $0001FFFD; °dONLNdMxHÑ\+.{The PrEvent Proc's CParam for the top folder}°dONLNd}Ü6íñ(è6iPrDrvrRef = -3;°dONLNdèî6†ú*getRslDataOp = 4;°dONLNd¢¢6ÆÑ*setRslOp = 5;°dONLNd±∞6ºñ*draftBitsOp = 6;°dONLNd√æ6 ¢*noDraftBitsOp = 7;°dONLNd◊Ã6ÿä*getRotnOp = 8;°dONLNdÁ⁄6Êä*NoSuchRsl = 1;°dONLNd˜Ë6Ù~* RgType1 = 1;
  1686. %*+¯4&*+¯ '*'˛
  1687. ˇ·ˇ‚7^ .°dONLNd*&M("*Data T˘@°dONLNd
  1688. L&d)"ypes
  1689. .°dONLNd1*=Ä(:*9TYPE TFeed = (feedCut,feedFanfold,feedMechCut,feedOther);°dONLNdJI6U+ &TScan = (scanTB,scanBT,scanLR,scanRL);°dONLNdra6mê*TPRect = ^Rect;°dONLNdÑaêmÍ)Z { A Rect Ptr }°dONLNdïy6ÖΔ(Ç6PrIdleProcPtr = ProcPtr;°dONLNdØë6ù¿*PItemProcPtr = ProcPtr;°dONLNd»©6µÆ*TPPrPort = ^TPrPort;°dONLNdfi∑6√ñ*TPrPort = RECORD°dONLNdÒ≈H—r+gPort: °dONLNd¸≈ê—Δ)H    GrafPort;°dONLNd    ≈ÿ—t)H{The Printer's graf port.}°dONLNd&”Hflx(‹HgProcs: °dONLNd2”êfl¿)HQDProcs;°dONLNd>”ÿfl>)H{..and its procs}°dONLNdR·HÌ~(ÍH    lGParam1:°dONLNd_·êÌ¿)HLongInt;°dONLNdkÔZ˚P(¯Z){16 bytes for private parameter storage.}°dONLNdó˝H    ~(H    lGParam2:°dONLNd§˝ê    ¿)HLongInt;°dONLNdØ H~(H    lGParam3:°dONLNdº ê¿)HLongInt;°dONLNd«H%~("H    lGParam4:°dONLNd‘ê%¿)HLongInt;°dONLNdfl'H3x(0HfOurPtr:°dONLNdÎ'ê3¿)HBoolean;°dONLNd˜5ZAt(>Z/{Whether the PrPort allocation was done by us.}°dONLNd)CHO~(LH    fOurBits:°dONLNd6CêO¿)HBoolean;°dONLNdBQZ]t(ZZ/{Whether the BitMap allocation was done by us.}°dONLNdt_Hk`(hHEND;°dONLNdzw6ÉÆ(Ä6TPPrInfo = ^TPrInfo;ˇ ¯@ˇ ˇˇˇˇ@
  1690. ˇ·ˇ‚7^
  1691. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äSummary
  1692. ~¿(‡1‡)-a¿)63(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿,
  1693. Courier
  1694. .°dONLNd\Th¥(eTTPrInfo = RECORD°dONLNdjfvÑ+iDev:°dONLNdjúvÃ)6Integer;°dONLNd&xfÑ&(Åf {Font Mgr/QuickDraw device code}°dONLNdIÜfíä*iVRes:°dONLNdRÜúíÃ)6Integer;°dONLNd^îx†Ü(ùx-{Resolution of device, in device coordinates}°dONLNdé¢fÆä(´fiHRes:°dONLNdó¢úÆÃ)6Integer;°dONLNd£∞xºå(πx.{..note: V before H => compatable with Point.}°dONLNd‘æf ä(«frPage:°dONLNd›æú ∫)6Rect;°dONLNdÊÃxÿ¬(’x7{The page (printable) rectangle in device coordinates.}°dONLNd⁄TÊl(„TEND;°dONLNd%ÚT˛¿*TPPrStl = ^TPrStl;°dONLNd9
  1695. TÆ*TPrStl = RECORD°dONLNdKf$Ñ+wDev:°dONLNdSú$Ã)6Integer;°dONLNd^&f2ê(/fiPageV:°dONLNdh&ú2Ã)6Integer;°dONLNds4f@ê(=fiPageH:°dONLNd}4ú@Ã)6Integer;°dONLNdàBfNä(KfbPort:°dONLNdëBúNfi)6 SignedByte;°dONLNdüPf\Ñ(Yffeed:°dONLNdßPú\¿)6TFeed;°dONLNdØ^Tjl(gTEND;°dONLNd¥vHÇ¥(HTPPrJob = ^TPrJob;°dONLNd«éHö¢*TPrJob = RECORD°dONLNdÿúT®ä+     iFstPage:°dONLNdÂúú®Ã)HInteger;°dONLNdÓúî )0  {Page range}°dONLNd˛™T∂ä(≥T    iLstPage:°dONLNd ™ú∂Ã)HInteger;°dONLNd∏TƒÑ(¡TiCopies:°dONLNd!∏úƒÃ)HInteger;°dONLNd*∏ÃP)0   {Number of copies.}°dONLNdBΔT“ê(œT
  1696. bJDocLoop:°dONLNdPΔú“fi)H SignedByte;°dONLNd]‘T‡V(›T+{The printing method: immediate or spooled}°dONLNdä‚TÓä*    fFromUsr:°dONLNdó‚úÓÃ)HBoolean;°dONLNd°T¸h(˘T.{Printing from an user's app (not PrApp) flag}°dONLNd—˛T
  1697. ê*
  1698. pIdleProc:°dONLNdfl˛ú
  1699. )HPrIdleProcPtr;°dONLNdÔ T¬(T={The proc called while application sends document to printer}°dONLNd.T&ê*
  1700. pFileName:°dONLNd<ú&ÿ)H
  1701. StringPtr;°dONLNdIÿ&™)<# {Spool filename: NIL for default.}°dONLNdn(T4ä(1T    iFileVol:°dONLNd{(ú4Ã)HInteger;°dONLNdÑ(Ã4∞)0&  {Spool file vol, set to 0 initially}°dONLNd¨6TBê(?T
  1702. bFileVers:°dONLNd∫6úBfi)H SignedByte;°dONLNd«DTPD(MT({Spool file version, set to 0 initially}°dONLNdÒRT^x*bJobX:°dONLNd˚Rú^fi)H SignedByte;°dONLNdRfi^J)B  {An extra byte.}°dONLNd`Tll(iTEND;°dONLNd xHÑ¥(ÅHTPPrint = ^TPrint;°dONLNd3êHú∫*THPrint = ^TPPrint;ˇx@ˇ ˇˇˇˇ@
  1703. ˇ·ˇ‚7^
  1704. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1705. (‡*1 )-c)64    )9Summary*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  1706. Courier
  1707. .°dONLNd\*hÑ(e*TPrint = RECORD°dONLNdj6vx+  iPrVersion:°dONLNd j~vÆ)HInteger;°dONLNd+j¥vn)6{(2) Printing software version}°dONLNdLx6Ñ`(Å6prInfo:°dONLNdWx~ÑÆ)HTPrInfo;°dONLNdbx¥ÑÜ)6#{the printer information subrecord}°dONLNdáÜ6í`(è6rPaper:°dONLNdíÜ~íú)HRect;°dONLNdöÜ¥í™)6){the paper rectangle [offset from rPage]}°dONLNd≈î6†Z(ù6prStl:°dONLNdœî~†®)HTPrStl;°dONLNdŸî¥†û)6'{information from the style dialog box}°dONLNd¢6Æl(´6    prInfoPT:°dONLNd¢~ÆÆ)HTPrInfo;°dONLNd¢ÆÆÜ)0$  {(14)  Print Time Imaging metrics}°dONLNd>∞6ºf(π6prXInfo:°dONLNdJ∞~º)HTPrXInfo;{Reserved}°dONLNd_æ6 Z(«6prJob:°dONLNdiæ~ ®)HTPrJob;°dONLNds楠í)6%{information from the job dialog box}°dONLNdöÃ6ÿ`(’6printX:°dONLNd•Ã~ÿV)H$ARRAY [1..19] OF Integer; {Reserved}°dONLNdÀ⁄6ÊN(„6END;°dONLNd–Ú*˛&(˚**{ The universal 120 byte printing record }°dONLNd˚* ∫*TPPrStatus = ^TPrStatus;°dONLNd*$ñ*TPrStatus = RECORD°dONLNd(&62r+ 
  1708. iTotPages:°dONLNd6&~2Æ)HInteger;°dONLNd?&Æ2V)0{Total pages in Print File.}°dONLNd]46@l(=6    iCurPage:°dONLNdj4~@Æ)HInteger;°dONLNds4Æ@¥)0 °dONLNdu4¥@2){Current page number}°dONLNdåB6Nx(K6 iTotCopies:°dONLNdõB~NÆ)HInteger;°dONLNd§BÆN>)0{Total copies requested}°dONLNdæP6\l(Y6    iCurCopy:°dONLNdÀP~\Æ)HInteger;°dONLNd‘PÆ\,)0{Current copy number}°dONLNdÎ^6jr(g6
  1709. iTotBands:°dONLNd˘^~jÆ)HInteger;°dONLNd^Æj8)0{Total bands per page.}°dONLNdl6xl(u6    iCurBand:°dONLNd(l~xÆ)HInteger;°dONLNd1lÆx,)0{Current band number}°dONLNdHz6Ül(É6    fPgDirty:°dONLNdUz~ÜÆ)HBoolean;°dONLNd^zÆÜ∞)0+{True if current page has been written to.}°dONLNdãà6îl(ë6    fImaging:°dONLNdòà~îÆ)HBoolean;°dONLNd°àÆîÄ)0#{Set while in band's DrawPic call.}°dONLNdΔñ6¢`(ü6hPrint:°dONLNd—ñ~¢Æ)HTHPrint;°dONLNd⁄ñÆ¢å)0%{Handle to the active Printer record}°dONLNd§6∞f(≠6pPrPort:°dONLNd§~∞¥)H    TPPrPort;°dONLNd§¥∞P)6{Ptr to the active PrPort}°dONLNd3≤6æT(ª6hPic:°dONLNd<≤~æ∫)H
  1710. PicHandle;°dONLNdG≤∫æn)<{Handle to the active Picture}°dONLNdg¿6ÃN(…6END;°dONLNdlÿ*‰‘(·*G{ PicFile = a TPfHeader followed by n QuickDraw Pics (whose PicSize is °dONLNd≥Ê*Úl* invalid!) }°dONLNdøÙ*ñ*TPPrDlg = ^TPrDlg;°dONLNd“*Ñ*TPrDlg = RECORD°dONLNd„6N+ Dlg:°dONLNdÎ~Ã)HDialogRecord;°dONLNd˘Ã“)N °dONLNd¸Ü)0{Ptr to the dialog box}°dONLNd6*r('6
  1711. pFltrProc:°dONLNd'~*)HModalFilterProcPtr;°dONLNdA¸*í)~{The dialog event filter}°dONLNd\,68r(56
  1712. pItemProc:°dONLNdj,~8Ã)HPItemProcPtr;°dONLNd~,¸8û)~{The Item evaluating proc.}°dONLNdõ:6Fr(C6
  1713. hPrintUsr:°dONLNd©:~FÆ)HTHPrint;°dONLNd∏:¸Fh)~{The print record}°dONLNdÃH6TZ(Q6fDoIt:°dONLNd÷H~TÆ)HBoolean;°dONLNdÂH¸TÄ)~{Dialog box confirmed}°dONLNd˝V6bZ(_6fDone:°dONLNdV~bÆ)HBoolean;°dONLNdV¸b∞)~{User’s interaction completed}°dONLNd6d6p`(m6lUser1:°dONLNdAd~pÆ)HLongInt;°dONLNdPd¸p∞)~{Storage for your application}°dONLNdpr6~`({6lUser2:°dONLNd{r~~Æ)HLongInt;°dONLNdär¸~∞)~{Storage for your application}°dONLNd™Ä6å`(â6lUser3:°dONLNdµÄ~åÆ)HLongInt;°dONLNdƒĸå∞)~{Storage for your application}°dONLNd‰é6ö`(ó6lUser4:°dONLNdÔé~öÆ)HLongInt;°dONLNd˛é¸ö∞)~{Storage for your application}°dONLNdú6®N(•6END;°dONLNd#¥*¿Δ(Ω*PDlgInitProcPtr = ProcPtr;ˇ
  1714. ‘@ˇ ˇˇˇˇ@
  1715. ˇ·ˇ‚7^
  1716. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äSummary
  1717. ~¿(‡1‡)-a¿)65(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿,
  1718. Courier
  1719. .°dONLNd\HhÆ(eHTGnlData = RECORD°dONLNdjTvÑ+ iOpCode:°dONLNdjúvÃ)HInteger;°dONLNd)xTÑ~(ÅTiError:°dONLNd4xúÑÃ)HInteger;°dONLNd>ÜTíê(èT
  1720. lReserved:°dONLNdLÜúíÃ)HLongInt;°dONLNdUÜÃí™)0% {more fields here depending on call}°dONLNd|îT†l(ùTEND;°dONLNdŨH∏∫(µHTGetRslBlk = RECORD°dONLNdñ∫TΔÑ+ iOpCode:°dONLNd¢∫úΔÃ)HInteger;°dONLNd¨»T‘~(—TiError:°dONLNd∑»ú‘Ã)HInteger;°dONLNd¡÷T‚ê(flT
  1721. lReserved:°dONLNdœ÷ú‚Ã)HLongInt;°dONLNdŸ‰TÑ(ÌTiRgType:°dONLNd‰úÃ)HInteger;°dONLNdÔÚT˛~(˚TxRslRg:°dONLNd˙Úú˛Δ)HTRslRg;°dONLNdT ~(    TyRslRg:°dONLNdú Δ)HTRslRg;°dONLNdTñ(T iRslRecCnt:°dONLNd&úÃ)HInteger;°dONLNd0T(ä(%T    rgRslRec:°dONLNd=ú(2)HARRAY [1..27] OF TRslRec;°dONLNdX*T6l(3TEND;°dONLNd]BHN¢(KHTRslRg = RECORD°dONLNdnPT\r+ iMin:°dONLNdtPr\¢)Integer;°dONLNd~^Tjr(gTiMax:°dONLNdÑ^rj¢)Integer;°dONLNdélTxl(uTEND;°dONLNdìÑHê®(çHTRslRec = RECORD°dONLNd•íTûx+ iXRsl:°dONLNd¨íxû®)$Integer;°dONLNd∂†T¨x(©TiYRsl:°dONLNdΩ†x¨®)$Integer;°dONLNd«ÆT∫l(∑TEND;°dONLNdÃΔH“∫(œHTSetRslBlk = RECORD°dONLNd·‘T‡Ñ+ iOpCode:°dONLNdÌ‘ú‡Ã)HInteger;°dONLNd˜‚TÓ~(ÎTiError:°dONLNd‚úÓÃ)HInteger;°dONLNd T¸ê(˘T
  1722. lReserved:°dONLNdú¸Ã)HLongInt;°dONLNd$˛T
  1723. ~(ThPrint:°dONLNd/˛ú
  1724. Ã)HTHPrint;°dONLNd9 Tx(TiXRsl:°dONLNdC úÃ)HInteger;°dONLNdMT&x(#TiYRsl:°dONLNdWú&Ã)HInteger;°dONLNda(T4l(1TEND;°dONLNdf@HL¿(IHTDftBitsBlk = RECORD°dONLNd|NTZÑ+ iOpCode:°dONLNdàNúZÃ)HInteger;°dONLNdí\Th~(eTiError:°dONLNdù\úhÃ)HInteger;°dONLNdßjTvê(sT
  1725. lReserved:°dONLNdµjúvÃ)HLongInt;°dONLNdøxTÑ~(ÅThPrint:°dONLNd xúÑÃ)HTHPrint;°dONLNd‘ÜTíl(èTEND;ˇ –@ˇ ˇˇˇˇ@
  1726. ˇ·ˇ‚7^
  1727. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1728. (‡*1 )-c)66    )9Summary*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯,
  1729. Courier
  1730. .°dONLNd\*h¢(e*TGetRotnBlk = RECORD°dONLNdj6vf+ iOpCode:°dONLNd"j~vÆ)HInteger;°dONLNd,x6Ñ`(Å6iError:°dONLNd7x~ÑÆ)HInteger;°dONLNdAÜ6ír(è6
  1731. lReserved:°dONLNdOÜ~íÆ)HLongInt;°dONLNdYî6†`(ù6hPrint:°dONLNddî~†Æ)HTHPrint;°dONLNdn¢6Æx(´6 fLandscape:°dONLNd}¢~ÆÆ)HBoolean;°dONLNdá∞6ºZ(π6bXtra:°dONLNdë∞~º¿)H SignedByte;°dONLNdûæ6 N(«6END;
  1732. ˚*¯4¸*¯ ˝*˝˛
  1733. ˇ·ˇ‚7^ .°dONLNd£Ó*¸Y(¯*Routines °dONLNd¨**"(Opening and Closing the Printing Manager
  1734. .°dONLNd’$*0ê*PROCEDURE PrOpen;°dONLNdÁ2*>ñ*PROCEDURE PrClose; .°dONLNd˙P*\l*Filling and V·‡°dONLNdPk\‹)Aerifying Print Records 
  1735. .°dONLNdc*oÆ(l*PROCEDURE PrintDefault°dONLNd6c‘o@)™(hPrint: THPrint);°dONLNdIq*}ú(z*FUNCTION PrValidate°dONLNd]q‘}v)™(hPrint: THPrint): Boolean; .°dONLNdyè*õB(ò*5Displaying and Customizing the Printing Dialog Boxes 
  1736. .°dONLNdØ¢*Æ¢*FUNCTION PrStlDialog°dONLNdƒ¢‘Æv)™(hPrint: THPrint): Boolean;°dONLNd‡∞*º¢(π*FUNCTION PrJobDialog°dONLNdı∞‘ºv)™(hPrint: THPrint): Boolean;°dONLNdæ* ñ(«*FUNCTION PrDlgMain°dONLNd$æ‘ Ë)™.(hPrint: THPrint; pDlgInit: PDlgInitProcPtr): °dONLNdRÃ⁄ÿ
  1737. +Boolean;°dONLNd[⁄*Êñ(„*FUNCTION PrStlInit°dONLNdn⁄‘Êv)™(hPrint: THPrint): TPPrDlg;°dONLNdäË*Ùñ(Ò*FUNCTION PrJobInit°dONLNdùË‘Ùv)™(hPrint: THPrint): TPPrDlg;°dONLNdπˆ*¢(ˇ*PROCEDURE PrJobMerge°dONLNdŒˆ‘ )™)(hPrintSrc: THPrint; hPrintDst: THPrint); .°dONLNd¯* S(*Printing
  1738. .°dONLNd'*3ñ*FUNCTION PrOpenDoc°dONLNd'‘3‚)™-(hPrint: THPrint; pPrPort: TPPrPort; pIOBuf: °dONLNdA5⁄A4+Ptr): TPPrPort;°dONLNdQC*O¢(L*PROCEDURE PrCloseDoc°dONLNdfC‘OL)™(pPrPort: TPPrPort);°dONLNd{Q*]¢(Z*PROCEDURE PrOpenPage°dONLNdêQ‘]ƒ)™((pPrPort: TPPrPort; pPageFrame: TPRect);°dONLNdπ_*k®(h*PROCEDURE PrClosePage°dONLNdœ_‘kL)™(pPrPort: TPPrPort);°dONLNd‰m*yú(v*PROCEDURE PrPicFile°dONLNd¯m‘y‹)™,(hPrint: THPrint;pPrPort: TPPrPort; pIOBuf: °dONLNd${⁄á‚+,Ptr; pDevBuf: Ptr; VAR prStatus: TPrStatus); .°dONLNdQô*•ê(¢*Optimizing Printing
  1739. .°dONLNde¨*∏ú*PROCEDURE PrGeneral°dONLNdy¨‘∏")™(pData: Ptr);ˇ¨@ˇ ˇˇˇˇ@
  1740. ˇ·ˇ‚7^
  1741. 4H\, Palatino.+ä"CHAPTER €`)\1,     Helvetica    (@äThe Printing Manager4⁄ä˙(‡äSummary
  1742. ~¿(‡1‡)-a¿)67(ÔäDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H¿ °dONLNd\Hhî(eHError Handling,
  1743. Courier
  1744. .°dONLNdoH{‰*FUNCTION PrError: INTEGER;°dONLNd*}Hâ¿*PROCEDURE PrSetError°dONLNd?}ÚâR)™(iErr: INTEGER); .°dONLNdPõHß≠(§HLow-Level Routines
  1745. .°dONLNdcÆH∫Δ*PROCEDURE PrDrvrOpen;°dONLNdyºH»Ã*PROCEDURE PrDrvrClose;°dONLNdê H÷Í*FUNCTION PrDrvrDCE: Handle;°dONLNd¨ÿH‰ˆ*FUNCTION PrDrvrVers: INTEGER; .°dONLNd ˆH¬*Low-Level Control Calls
  1746. .°dONLNd‚    H∫*PROCEDURE PrCtlCall°dONLNdˆ    Ú)™.(iWhichCtl: INTEGER;lParam1: LONGINT;lParam2: °dONLNd$¯#ö+LONGINT; lParam3: LONGINT);
  1747. THZ4UHZ VHV
  1748. ˇ·ˇ‚7^ .°dONLNd@GHU¯(QHAssembly-Language Information °dONLNd^jHvO*"Tû °dONLNd_jNv)&rap Macros Requiring Routine Selectors
  1749. °dONLNdÜ{Hál(ÑH_PrGlueˇ
  1750. ¿@ˇ ˇˇˇˇ@
  1751. ˇ·ˇ‚7^
  1752. 4*\˜, Palatino.+l"CHAPTER €`)\1,     Helvetica    (@lThe Printing Manager4⁄*˙¯
  1753. (‡*1 )-c)68    )9Summary*Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿¯    °dONLNd\*gM(d*Selector°dONLNd    \§g≈)zRoutine
  1754. °dONLNdj*vY(s*    $C8000000,
  1755. Courier.°dONLNdj§v»)zPrOpen.°dONLNd"z*ÜY(É*    $D0000000.°dONLNd,z§ÜŒ)zPrClose.°dONLNd4ä*ñW(ì*    $20040480.°dONLNd>ä§ñÏ)z PrintDefault.°dONLNdKö*¶W(£*    $52040498.°dONLNdUö§¶‡)z
  1756. PrValidate.°dONLNd`™*∂Y(≥*    $2A040484.°dONLNdj™§∂Ê)z PrStlDialog.°dONLNdv∫*ΔW(√*    $32040488.°dONLNdÄ∫§ΔÊ)z PrJobDialog.°dONLNdå *÷Y(”*    $4A040894.°dONLNdñ §÷⁄)z    PrDlgMain.°dONLNd†⁄*Ê[(„*    $3C04040C.°dONLNd™⁄§Ê⁄)z    PrStlInit.°dONLNd¥Í*ˆW(Û*    $44040410.°dONLNdæÍ§ˆ⁄)z    PrJobInit.°dONLNd»˙*Y(*    $5804089C.°dONLNd“˙§‡)z
  1757. PrJobMerge.°dONLNd›
  1758. *Y(*    $04000C00.°dONLNdÁ
  1759. §⁄)z    PrOpenDoc.°dONLNdÒ*&W(#*    $08000484.°dONLNd˚§&‡)z
  1760. PrCloseDoc.°dONLNd**6W(3*    $10000808.°dONLNd*§6‡)z
  1761. PrOpenPage.°dONLNd:*FY(C*    $1800040C.°dONLNd%:§FÊ)z PrClosePage.°dONLNd1J*VW(S*    $60051480.°dONLNd;J§V⁄)z    PrPicFile.°dONLNdEZ*fZ(c*    $BA000000.°dONLNdOZ§fŒ)zPrError.°dONLNdWj*vY(s*    $C0000200.°dONLNdaj§v‡)z
  1762. PrSetError.°dONLNdlz*ÜW(É*    $70070480.°dONLNdvz§Ü⁄)z    PrGeneral.°dONLNdÄä*ñW(ì*    $94000000.°dONLNdää§ñ⁄)z    PrDrvrDCE.°dONLNdîö*¶Y(£*    $9A000000.°dONLNdûö§¶‡)z
  1763. PrDrvrVers.°dONLNd©™*∂W(≥*    $80000000.°dONLNd≥™§∂‡)z
  1764. PrDrvrOpen.°dONLNdæ∫*ΔW(√*    $88000000.°dONLNd»∫§ΔÊ)z PrDrvrClose.°dONLNd‘ *÷Z(”*    $A0000E00.°dONLNdfi §÷⁄)z    PrCtlCallˇ$:@ˇ ˇˇˇˇ@
  1765. ˇ·ˇ‚7^
  1766. 4⁄∫˙,     Helvetica
  1767. .ù†(‡IN-‡)1(Ô∫Draft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^H°
  1768. vH†4vH† üHü
  1769. ˇ·ˇ‚7^ˇˇÖ0ˇÆ°dONLNdZ∫sÚ(n∫Index4ßH¡&
  1770. ∂H¿&4∑H¿& ∑H∑&
  1771. ˇ·ˇ‚7^°dONLNd¶H∂R(≤HB, Palatino    °dONLNdøH»c*backgra°dONLNdøc»É)ound prÇİdONLNdøÉ»û) ocedur P°dONLNdøü»£)e°dONLNd Q”n(—Qwriting˙İdONLNd% t”í)#25 to 26
  1772. H &4H & H&
  1773. ˇ·ˇ‚7^°dONLNd.ÒHS(˝HD    °dONLNd0
  1774. H`*deferrë°dONLNd6
  1775. `å) ed printing>°dONLNdB
  1776. ìó)34°dONLNdDHÄ(Hdialog event fiz¿°dONLNdSÅí)9lters°dONLNdY Q)ó('QPrinting Manager‡°dONLNdj û)ß)M23°dONLNdm+H4[(2Hdiscr“°dONLNdr+[4l)ete r‡°dONLNdw+m4ë)    esolution–`°dONLNdÅ+ó4õ)*5°dONLNdÉ6H?|(=Hdots per inch܇°dONLNdë6Ç?Ü):5°dONLNdìAHJÇ(HHdraft printing, [ °dONLNd£AÉJè);See]¿°dONLNd¶AèJfi)  immediate printing°dONLNd∫LHUù(SHdraft-quality printing°dONLNd—L§U®)\4
  1777. ÉHç&4ÑHç& ÑHÑ&
  1778. ˇ·ˇ‚7^°dONLNd”sHÉS(HH    °dONLNd’åHïú*high-quality printingù†°dONLNdÎå¢ï¶)Z4
  1779. √HÕ&4ƒHÕ& ƒHƒ&
  1780. ˇ·ˇ‚7^°dONLNdÌ≥H√L(øHI    °dONLNdÔÃH’b*idle prô°dONLNdˆÃb’})ocedur#¿°dONLNd¸Ã~’Ç)es`°dONLNd˛Ãà’å)
  1781. 9°dONLNd◊Q‡`(fiQdefi¿‡°dONLNd◊`‡w)nitionQ °dONLNd ◊~‡ì)8 to 9°dONLNd‚HÎï(ÈHimmediate printing
  1782. H#&4H#& H&
  1783. ˇ·ˇ‚7^°dONLNd%    HP*,J    °dONLNd'"H+∂*job dialog box (for printing)D¿°dONLNdE"Ω+¡)u7°dONLNdG-H6h(4Hjob subr\–°dONLNdO-h6x) ecor˘‡°dONLNdS-x6})d
  1784. dHn&4eHn& eHe&
  1785. ˇ·ˇ‚7^°dONLNdUTHdR(`HP    °dONLNdWmHva*page r^°dONLNd]mavÅ)ectangleI0°dONLNdfmàvå)'4°dONLNdhxHÅd(Hpaper rTê°dONLNdoxeÅÖ)ectangle>–°dONLNdxxåÅê)'4,
  1786. Courier.°dONLNdzÇHçk(äHPrClose.°dONLNdÅÉkåv)# prç°dONLNdÑÉvåë) ocedur¿°dONLNdäÉíåñ)eg`°dONLNdåÉúå•)
  1787. 40.°dONLNdèçHòz(ïH
  1788. PrCloseDoc.°dONLNdôézóÖ)2 prç°dONLNdúéÖó†) ocedur¿°dONLNd¢é°ó•)eg`°dONLNd§é´ó¥)
  1789. 48.°dONLNdßòH£(†H PrClosePage.°dONLNd≤ô¢ä)7 prç°dONLNdµô䢕) ocedur¿°dONLNdªô¶¢™)eg`°dONLNdΩô∞¢π)
  1790. 49.°dONLNd¿£HÆu(´H    PrCtlCall.°dONLNd…§u≠Ä)- prç°dONLNdçÄ≠õ) ocedur¿°dONLNd“§ú≠†)e.°dONLNd‘ÆQπÉ(∂Q
  1791. iPrBitsCtl.°dONLNdfiØÉ∏ô)2 contr9°dONLNd‰Øö∏≈) ol constantî°dONLNdØÀ∏‘)1584ß8¡.°dONLNdÛ•A∞n(≠A    iPrDevCtl.°dONLNd¸¶nØÑ)- contr9°dONLNd¶ÖØ∞) ol constantî°dONLNd¶∂Øø)160.°dONLNd∞Aªn(∏A    iPrEvtCtl.°dONLNd±n∫Ñ)- contr9°dONLNd ±Ö∫∞) ol constantî°dONLNd,±∂∫ø)159.°dONLNd/ªAΔi(√AiPrIOCtl.°dONLNd7ºi≈)( contr9°dONLNd=ºÄ≈´) ol constantî°dONLNdIº±≈∫)159.°dONLNdLΔ8—e(Œ8    PrDlgMain.°dONLNdU«e–à)-     function°dONLNd_«è–ò)*44.°dONLNdb—8‹o(Ÿ8 PrDrvrClose.°dONLNdm“o€z)7 prç°dONLNdp“z€ï) ocedur¿°dONLNdv“ñ€ö)eg`°dONLNdx“†€©)
  1792. 57.°dONLNd{‹8Áe(‰8    PrDrvrDCE.°dONLNdÑ›eÊà)-     function°dONLNdé›èÊò)*57.°dONLNdëÁ8Új(Ô8
  1793. PrDrvrOpen.°dONLNdõËjÒu)2 prç°dONLNdûËuÒê) ocedur¿°dONLNd§ËëÒï)eg`°dONLNd¶ËõÒ§)
  1794. 56.°dONLNd©Ú8˝j(˙8
  1795. PrDrvrVers.°dONLNd≥Ûj¸ç)2     function°dONLNdΩÛî¸ù)*58.°dONLNd¿˝8[(8PrError.°dONLNd«˛[~)#     function°dONLNd—˛Öé)*54.°dONLNd‘8e(8    PrGeneral.°dONLNd›    ep)- prç°dONLNd‡    pã) ocedur¿°dONLNdÊ    åê)eg`°dONLNdË    ñü)
  1796. 51.°dONLNdÎAx(A DraftBitsOp.°dONLNdˆxó)7 opcode °dONLNd˛ù¶)%53.°dONLNdA)n(&A    GetRotnOp.°dONLNd
  1797. n(ç)- opcode °dONLNdì(ú)%53.°dONLNd)A4}(1A GetRslDataOp.°dONLNd!*}3ú)< opcode °dONLNd)*¢3´)%51.°dONLNd,4A?Ç(<ANoDraftBitsOp.°dONLNd95Ç>°)A opcode °dONLNdA5ß>∞)%53.°dONLNdD?AJi(GASetRslOp.°dONLNdL@iIà)( opcode °dONLNdT@éIó)%52°dONLNdWK8TQ(R8print rÁ°dONLNd^KQTa)ecorÑ °dONLNdbKbTg)dİdONLNddKnTr) 7°dONLNdfVA_a(]Ajob subr\–°dONLNdnVa_q) ecor˘‡°dONLNdrVq_v)dy@°dONLNdtV}_Å) 8°dONLNdvaAj¢(hAprinter information subr∂∞°dONLNdéa¢j≤)aecorS¿°dONLNdía≥j∏)d” °dONLNdîaæj¬) 8.°dONLNdñk8vt(s8 PrintDefault.°dONLNd¢ltu)< prç°dONLNd•luö) ocedur¿°dONLNd´lõuü)eg`°dONLNd≠l•uÆ)
  1798. 42°dONLNd∞w8Än(~8printer driverˇ °dONLNdøwtÄx)<3°dONLNd¡Ç8ãY(â8    printer rƒ–°dONLNd ÇYão)!esour° °dONLNdœÇoã)ce fi°@°dONLNd‘ÇãÖ)leè`°dONLNd◊Çåãê)3°dONLNdŸç8ñ{(î8printing grafPortD†°dONLNdÎçÇñÜ)J6°dONLNdÌò8°~(ü8Printing Manager°dONLNd˛£A¨y+     job dialog box∞@°dONLNd£¨É)>7°dONLNdÆA∑(µAstyle dialog box`İdONLNd ÆÜ∑ä)E7.°dONLNd"∏8√o(¿8 PrJobDialog.°dONLNd-πo¬í)7     function°dONLNd7πô¬¢)*43.°dONLNd:√8Œe(À8    PrJobInit.°dONLNdCƒeÕà)-     function°dONLNdMƒèÕò)*45.°dONLNdPŒ8Ÿj(÷8
  1799. PrJobMerge.°dONLNdZœjÿu)2 prç°dONLNd]œuÿê) ocedur¿°dONLNdcœëÿï)eg`°dONLNdeœõÿ§)
  1800. 46.°dONLNdhŸ8‰V(·8PrOpen.°dONLNdn⁄V„a) prç°dONLNdq⁄a„|) ocedur¿°dONLNdw⁄}„Å)eg`°dONLNdy⁄á„ê)
  1801. 40.°dONLNd|‰8Ôe(Ï8    PrOpenDoc.°dONLNdÖÂeÓà)-     function°dONLNdèÂèÓò)*47.°dONLNdíÔ8˙j(˜8
  1802. PrOpenPage.°dONLNdúj˘u)2 prç°dONLNdüu˘ê) ocedur¿°dONLNd•ë˘ï)eg`°dONLNdßõ˘§)
  1803. 48.°dONLNd™˙8e(8    PrPicFile.°dONLNd≥˚ep)- prç°dONLNd∂˚pã) ocedur¿°dONLNdº˚åê)eg`°dONLNdæ˚ñü)
  1804. 50.°dONLNd¡8j(8
  1805. PrSetError.°dONLNdÀju)2 prç°dONLNdŒuê) ocedur¿°dONLNd‘ëï)eg`°dONLNd÷õ§)
  1806. 56.°dONLNdŸ8o(8 PrStlDialog.°dONLNd‰oí)7     function°dONLNdÓô¢)*43.°dONLNdÒ8&e(#8    PrStlInit.°dONLNd˙e%à)-     function°dONLNdè%ò)*45.°dONLNd&81j(.8
  1807. PrValidate.°dONLNd'j0ç)2     function°dONLNd'î0ù)*41
  1808. ^8h4_8h _8_
  1809. ˇ·ˇ‚7^°dONLNdN8^C(Z8R    °dONLNd g8p;*r°dONLNd!g;pâ)esolution of devices∫p°dONLNd6gêpî)U5
  1810. û8®4ü8® ü8ü
  1811. ˇ·ˇ‚7^°dONLNd8é8ûB(ö8S    °dONLNd:ß8∞U*spool fi›@°dONLNdBßU∞[)leÀ`°dONLNdEßb∞f)4°dONLNdG≤8ªr(π8spool printing J@°dONLNdV≤sª);SeeL‡°dONLNdY≤ªô)  deferrù°dONLNd`≤ôª≈) ed printingK–°dONLNdl≤ê–)34ˇ
  1812. Ó@ˇ ˇˇˇˇ@
  1813. ˇ·ˇ‚7^
  1814. 4*I˜, Palatino.+ú"INDEX4⁄*˙¯,     Helvetica
  1815. (‡*IN-”@)2+eDraft. PreliminaryVP):, Confi)dential. ©1991 ˘Å)0Apple ComputerÒ)7, Inc. Ìë)1/9/924^*¿    °dONLNd]*fü(d*style dialog box (for printing)ı°dONLNd ]•f©){7
  1816. î*û4ï*û ï*ï
  1817. ˇ·ˇ‚7^°dONLNd"Ñ*î3(ê*T,
  1818. Courier    .°dONLNd$ú*ßa* TDftBitsBlk.°dONLNd/ùa¶à)7
  1819.  data type@°dONLNd:ùè¶ò).38.°dONLNd=ß*≤a(Ø* TGetRotnBlk.°dONLNdH®a±à)7
  1820.  data type@°dONLNdS®è±ò).38.°dONLNdV≤*Ω\(∫*
  1821. TGetRslBlk.°dONLNd`≥\ºÉ)2
  1822.  data type@°dONLNdk≥äºì).35.°dONLNdnΩ*»R(≈*TGnlData.°dONLNdvæR«y)(
  1823.  data type@°dONLNdſīâ).35°dONLNdÑ…3“5(–3.¿°dONLNdÖ…5“S)    See also .@†°dONLNdé»T”Å)    PrGeneral.@†°dONLNdó…Å“å)- prNê°dONLNdö…å“ß) ocedurÿ`°dONLNd†…ß“´)e(°dONLNd¢…≤“ª) 35.°dONLNd•”*fiH(€*TPrDlg.°dONLNd´‘H›o)
  1824.  data type@°dONLNd∂‘v›).39.°dONLNdπfi*ÈM(Ê*TPrInfo.°dONLNd¿flMËt)#
  1825.  data type@°dONLNdÀfl{ËÑ).31.°dONLNdŒÈ*ÙH(Ò*TPrint.°dONLNd‘ÍHÛo)
  1826.  data type@°dONLNdflÍvÛ).30°dONLNd‚ı3˛5(¸3.¿°dONLNd„ı5˛Q)See also†°dONLNdÎıR˛m) print rß∞°dONLNdÛım˛})ecorD¿°dONLNd˜ı~˛É)d.°dONLNd˘ˇ*
  1827. H(*TPrJob.°dONLNdˇH    o)
  1828.  data type@°dONLNd
  1829. v    ).31°dONLNd 35(3.¿°dONLNd 5Q)See also†°dONLNd Rt)     job subrp°dONLNd tÑ)"ecor∫İdONLNd# Ñâ)d.°dONLNd%* W(*    TPrStatus.°dONLNd.W~)-
  1830.  data type@°dONLNd9Öé).33.°dONLNd< *+H((*TPrStl.°dONLNdB!H*o)
  1831.  data type@°dONLNdM!v*).33.°dONLNdP+*6\(3*
  1832. TSetRslBlk.°dONLNdZ,\5É)2
  1833.  data type@°dONLNde,ä5ì).37
  1834. c*m4d*m d*d
  1835. ˇ·ˇ‚7^°dONLNdhS*c4(_*V    °dONLNdjl*uO*
  1836. variable rP°dONLNdtlPut)&    esolutionê°dONLNd~l{u)+54^¿˜ˇ